1+ * {
2+ margin : 0 ;
3+ padding : 0 ;
4+ box-sizing : border-box;
5+ }
6+
7+ body {
8+ padding : 5vw ;
9+ height : 100vh ;
10+ background : # 222 ;
11+ overflow : hidden;
12+ }
13+
14+ # outside-circle {
15+ position : absolute;
16+ width : 10vw ;
17+ height : 10vw ;
18+ background : red;
19+ border-radius : 50% ;
20+ animation : go-around 8s linear infinite;
21+ }
22+
23+ @keyframes go-around {
24+ 0% , 100% {
25+ transform : translate (0 , 0 );
26+ }
27+ 25% {
28+ transform : translate (calc (100vw - 20vw ), 0 );
29+ }
30+ 50% {
31+ transform : translate (calc (100vw - 20vw ), calc (100vh - 20vh ));
32+ }
33+ 75% {
34+ transform : translate (0 , calc (100vh - 20vh ));
35+ }
36+ }
37+
38+ .center-circles-wrapper {
39+ position : absolute;
40+ width : 50vw ;
41+ height : 50vw ;
42+ top : 50% ;
43+ left : 50% ;
44+ transform : translate (-50% , -50% );
45+ background-color : gray;
46+ border-radius : 40% ;
47+ animation : linear 30s infinite color-change;
48+ }
49+
50+ .center-circles-wrapper > div {
51+ width : 10vw ;
52+ height : 20vw ;
53+ position : absolute;
54+ top : calc (50% - 10vw );
55+ left : calc (50% - 5vw );
56+ transform : translate (-50% , -50% );
57+ border-radius : 50% ;
58+ animation : linear 5s infinite rotate;
59+
60+ }
61+
62+ .white {
63+ background-color : white;
64+ }
65+
66+ .black {
67+ background-color : black;
68+ }
69+
70+ .one {
71+ rotate : 20deg ;
72+ }
73+
74+ .two {
75+ rotate : 40deg ;
76+ }
77+
78+ .three {
79+ rotate : 60deg ;
80+ }
81+
82+ .four {
83+ rotate : 80deg ;
84+ }
85+
86+ .five {
87+ rotate : 100deg ;
88+ }
89+
90+ .six {
91+ rotate : 120deg ;
92+ }
93+
94+ .seven {
95+ rotate : 140deg ;
96+ }
97+
98+ .eight {
99+ rotate : 160deg ;
100+ }
101+
102+ @keyframes rotate {
103+ 0% {
104+ transform : rotate (0deg );
105+ }
106+ 100% {
107+ transform : rotate (360deg );
108+ }
109+ }
110+
111+ @keyframes color-change {
112+ 0% , 100% {
113+ background-color : gray;
114+ }
115+
116+ 10% {
117+ background-color : red;
118+ }
119+
120+ 20% {
121+ background-color : orange;
122+ }
123+
124+ 30% {
125+ background-color : yellow;
126+ }
127+
128+ 40% {
129+ background-color : green;
130+ }
131+
132+ 50% {
133+ background-color : blue;
134+ }
135+
136+ 60% {
137+ background-color : indigo;
138+ }
139+
140+ 70% {
141+ background-color : violet;
142+ }
143+
144+ 80% {
145+ background-color : dodgerblue;
146+ }
147+
148+ 90% {
149+ background-color : white;
150+ }
151+ }
0 commit comments