1
1
div {
2
- background-color : red;
3
- border-radius : 100% ;
4
- height : 50px ;
5
- left : calc (50% - 50px );
6
- position : absolute;
7
- right : calc (50% - 50px );
8
- width : 50px ;
9
- animation : bounce 1s ease-in-out infinite;
10
- animation-fill-mode : both;
11
- animation-direction : alternate;
12
- }
13
-
14
- span {
15
- border-radius : 100% ;
16
- bottom : 32.5% ;
17
- left : calc (50% - 50px );
18
- right : calc (50% - 50px );
19
- position : absolute;
20
- content : '' ;
21
- background-color : black;
2
+ background : radial-gradient (circle at 25% 25% , # ff0000, # ff4500 );
3
+ border-radius : 100% ;
4
+ height : 50px ;
5
+ left : calc (50% - 50px );
6
+ position : absolute;
7
+ right : calc (50% - 50px );
8
+ width : 50px ;
9
+ box-shadow : 0 8px 15px rgba (0 , 0 , 0 , 0.2 ),
10
+ 0 15px 30px rgba (0 , 0 , 0 , 0.3 ),
11
+ 0 30px 45px rgba (0 , 0 , 0 , 0.4 );
12
+ animation : bounce 1s ease-in-out infinite,
13
+ colorChange 2s linear infinite,
14
+ ballRotate 1.5s infinite ease-in-out alternate,
15
+ pulse 1s infinite;
16
+ animation-fill-mode : both;
17
+ animation-direction : alternate;
18
+ }
19
+
20
+ span {
21
+ border-radius : 100% ;
22
+ bottom : 32.5% ;
23
+ left : calc (50% - 50px );
24
+ right : calc (50% - 50px );
25
+ position : absolute;
26
+ content : '' ;
27
+ background-color : black;
28
+ filter : blur (5px );
29
+ width : 50px ;
30
+ height : 5px ;
31
+ animation : shadow 1s ease-in-out infinite,
32
+ shadowBlur 1s ease-in-out infinite,
33
+ shadowSpread 1s infinite alternate;
34
+ animation-fill-mode : both;
35
+ z-index : -1 ;
36
+ }
37
+
38
+ @keyframes bounce {
39
+ from {
40
+ top : 25% ;
41
+ transform : scaleX (79.5% ) scaleY (65% );
42
+ }
43
+ to {
44
+ top : 55% ;
45
+ transform : scale (100% );
46
+ }
47
+ }
48
+
49
+ @keyframes shadow {
50
+ from {
51
+ opacity : 0 ;
52
+ transform : scale (0.5 );
53
+ }
54
+ to {
55
+ opacity : 0.5 ;
56
+ transform : scale (1 );
57
+ }
58
+ }
59
+
60
+ @keyframes colorChange {
61
+ 0% {
62
+ background : radial-gradient (circle at 25% 25% , # ff0000, # ff4500 );
63
+ }
64
+ 100% {
65
+ background : radial-gradient (circle at 25% 25% , # 00bfff, # 1e90ff );
66
+ }
67
+ }
68
+
69
+ @keyframes shadowBlur {
70
+ 0% {
22
71
filter : blur (3px );
72
+ }
73
+ 100% {
74
+ filter : blur (8px );
75
+ }
76
+ }
77
+
78
+ @keyframes shadowSpread {
79
+ from {
23
80
width : 50px ;
24
81
height : 5px ;
25
- animation : shadow 1s ease-in-out infinite;
26
- animation-fill-mode : both;
27
- animation-direction : alternate;
28
- z-index : -1 ;
29
- }
30
-
31
- @keyframes bounce {
32
- from {
33
- top : 25% ;
34
- transform : scaleX (79.5% ) scaleY (65% );
35
- }
36
- to {
37
- top : 55% ;
38
- }
39
- }
40
-
41
- @keyframes shadow {
42
- from {
43
- opacity : 0 ;
44
- transform : scale (0 );
45
- }
46
- to {
47
- opacity : .5 ;
48
- transform : scale (100% );
49
- }
50
- }
82
+ }
83
+ to {
84
+ width : 60px ;
85
+ height : 8px ;
86
+ }
87
+ }
88
+
89
+ @keyframes ballRotate {
90
+ from {
91
+ transform : rotate (0deg );
92
+ }
93
+ to {
94
+ transform : rotate (360deg );
95
+ }
96
+ }
97
+
98
+ @keyframes pulse {
99
+ 0% {
100
+ transform : scale (1 );
101
+ }
102
+ 50% {
103
+ transform : scale (1.05 );
104
+ }
105
+ 100% {
106
+ transform : scale (1 );
107
+ }
108
+ }
0 commit comments