Skip to content

Commit 4faa25b

Browse files
create bouncing-ball css
1 parent a3bd247 commit 4faa25b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

css/bounding-ball.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<style>
2+
3+
#ball {
4+
width: 100px;
5+
height: 100px;
6+
margin: 50px auto;
7+
position: relative;
8+
border-radius: 50%;
9+
background: linear-gradient(
10+
35deg,
11+
#ccffff,
12+
#ffcccc
13+
);
14+
animation-name: bounce;
15+
animation-duration: 1s;
16+
animation-iteration-count: infinite;
17+
}
18+
19+
@keyframes bounce{
20+
0% {
21+
top: 0px;
22+
}
23+
50% {
24+
top: 249px;
25+
width: 130px;
26+
height: 70px;
27+
}
28+
100% {
29+
top: 0px;
30+
}
31+
}
32+
</style>
33+
<div id="ball"></div>

0 commit comments

Comments
 (0)