1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
| <!DOCTYPE html> <html lang="en">
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .container{ width: 300px; height: 300px; margin: 0 auto; margin-top: 100px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-template: "a a b" "c d b" "c e e"; gap: 5px; --r: 360deg; } .item{ overflow: hidden; border: 2px solid; object-fit: cover; display: flex; justify-content: center; align-items: center; } .item img{ width: 260%; height: 260%; --r: -360deg; } .item:nth-child(1){ grid-area: a; } .item:nth-child(2){ grid-area: b; } .item:nth-child(3){ grid-area: c; } .item:nth-child(4){ grid-area: d; } .item:nth-child(5){ grid-area: e; }
.container, .item img{ animation: rotation 10s infinite linear; } @keyframes rotation { to{ transform: rotate(var(--r)); } } </style> </head> <body> <script src="test.js"></script> </body> <div class="container"> <div class="item"> <img src="./images/Capture001.png" alt="" class=""> </div> <div class="item"> <img src="./images/Capture002.png" alt="" class=""> </div> <div class="item"> <img src="./images/Capture002.png" alt="" class=""> </div> <div class="item"> <img src="./images/Capture001.png" alt="" class=""> </div> <div class="item"> <img src="./images/Capture001.png" alt="" class=""> </div> </div> <script>
</script> </html>
|