|
1 | 1 | body { |
2 | | - margin:0; |
3 | | - height:100vh; |
4 | | - display:flex; |
5 | | - justify-content:center; |
6 | | - align-items:center; |
7 | | - background:#000; |
8 | | - overflow:hidden; |
9 | | - font-family:sans-serif; |
| 2 | + margin: 0; |
| 3 | + height: 100vh; |
| 4 | + display: flex; |
| 5 | + justify-content: center; |
| 6 | + align-items: center; |
| 7 | + background: #000; |
| 8 | + overflow: hidden; |
| 9 | + font-family: sans-serif; |
10 | 10 | } |
11 | 11 |
|
12 | 12 | .swirl { |
13 | | - position:relative; |
14 | | - width:400px; |
15 | | - height:400px; |
| 13 | + position: relative; |
| 14 | + width: 400px; |
| 15 | + height: 400px; |
16 | 16 | } |
17 | 17 |
|
18 | 18 | .swirl div { |
19 | | - position:absolute; |
20 | | - top:50%; |
21 | | - left:50%; |
22 | | - width:20px; |
23 | | - height:20px; |
24 | | - background:#fff; |
25 | | - border-radius:50%; |
| 19 | + position: absolute; |
| 20 | + top: 50%; |
| 21 | + left: 50%; |
| 22 | + width: 20px; |
| 23 | + height: 20px; |
| 24 | + background: #fff; |
| 25 | + border-radius: 50%; |
26 | 26 | /* color added per child */ |
27 | | - transform-origin:-200px 0; |
| 27 | + transform-origin: -200px 0; |
28 | 28 | animation: orbit 4s linear infinite alternate; |
29 | 29 | } |
30 | 30 |
|
31 | 31 | /* color and delay variations */ |
32 | | -.swirl div:nth-child(odd) { animation-duration:3s; } |
33 | | -.swirl div:nth-child(even) { animation-duration:5s; } |
34 | | -.swirl div:nth-child(1) { animation-delay:0s; box-shadow:0 0 15px 3px #ff3; } |
35 | | -.swirl div:nth-child(2) { animation-delay:0.2s; box-shadow:0 0 15px 3px #3ff; } |
36 | | -.swirl div:nth-child(3) { animation-delay:0.4s; box-shadow:0 0 15px 3px #f3f; } |
37 | | -.swirl div:nth-child(4) { animation-delay:0.6s; box-shadow:0 0 15px 3px #3f3; } |
38 | | -.swirl div:nth-child(5) { animation-delay:0.8s; box-shadow:0 0 15px 3px #ff6; } |
39 | | -.swirl div:nth-child(6) { animation-delay:1s; box-shadow:0 0 15px 3px #6ff; } |
40 | | -.swirl div:nth-child(7) { animation-delay:1.2s; box-shadow:0 0 15px 3px #f66; } |
41 | | -.swirl div:nth-child(8) { animation-delay:1.4s; box-shadow:0 0 15px 3px #66f; } |
42 | | -.swirl div:nth-child(9) { animation-delay:1.6s; box-shadow:0 0 15px 3px #c3f; } |
43 | | -.swirl div:nth-child(10){ animation-delay:1.8s; box-shadow:0 0 15px 3px #3c3; } |
| 32 | +.swirl div:nth-child(odd) { |
| 33 | + animation-duration: 3s; |
| 34 | +} |
| 35 | +.swirl div:nth-child(even) { |
| 36 | + animation-duration: 5s; |
| 37 | +} |
| 38 | +.swirl div:nth-child(1) { |
| 39 | + animation-delay: 0s; |
| 40 | + box-shadow: 0 0 15px 3px #ff3; |
| 41 | +} |
| 42 | +.swirl div:nth-child(2) { |
| 43 | + animation-delay: 0.2s; |
| 44 | + box-shadow: 0 0 15px 3px #3ff; |
| 45 | +} |
| 46 | +.swirl div:nth-child(3) { |
| 47 | + animation-delay: 0.4s; |
| 48 | + box-shadow: 0 0 15px 3px #f3f; |
| 49 | +} |
| 50 | +.swirl div:nth-child(4) { |
| 51 | + animation-delay: 0.6s; |
| 52 | + box-shadow: 0 0 15px 3px #3f3; |
| 53 | +} |
| 54 | +.swirl div:nth-child(5) { |
| 55 | + animation-delay: 0.8s; |
| 56 | + box-shadow: 0 0 15px 3px #ff6; |
| 57 | +} |
| 58 | +.swirl div:nth-child(6) { |
| 59 | + animation-delay: 1s; |
| 60 | + box-shadow: 0 0 15px 3px #6ff; |
| 61 | +} |
| 62 | +.swirl div:nth-child(7) { |
| 63 | + animation-delay: 1.2s; |
| 64 | + box-shadow: 0 0 15px 3px #f66; |
| 65 | +} |
| 66 | +.swirl div:nth-child(8) { |
| 67 | + animation-delay: 1.4s; |
| 68 | + box-shadow: 0 0 15px 3px #66f; |
| 69 | +} |
| 70 | +.swirl div:nth-child(9) { |
| 71 | + animation-delay: 1.6s; |
| 72 | + box-shadow: 0 0 15px 3px #c3f; |
| 73 | +} |
| 74 | +.swirl div:nth-child(10) { |
| 75 | + animation-delay: 1.8s; |
| 76 | + box-shadow: 0 0 15px 3px #3c3; |
| 77 | +} |
44 | 78 |
|
45 | 79 | @keyframes orbit { |
46 | | - from { transform:rotate(0deg) translateX(200px) rotate(0deg); } |
47 | | - to { transform:rotate(360deg) translateX(200px) rotate(-360deg); } |
| 80 | + from { |
| 81 | + transform: rotate(0deg) translateX(200px) rotate(0deg); |
| 82 | + } |
| 83 | + to { |
| 84 | + transform: rotate(360deg) translateX(200px) rotate(-360deg); |
| 85 | + } |
48 | 86 | } |
49 | 87 |
|
50 | 88 | .credit { |
51 | | - position:absolute; |
52 | | - bottom:10px; |
53 | | - font-size:0.8rem; |
54 | | - color:#fff; |
| 89 | + position: absolute; |
| 90 | + bottom: 10px; |
| 91 | + font-size: 0.8rem; |
| 92 | + color: #fff; |
| 93 | +} |
| 94 | +.credit a { |
| 95 | + color: #fff; |
| 96 | + text-decoration: none; |
55 | 97 | } |
56 | | -.credit a { color:#fff; text-decoration:none; } |
|
0 commit comments