Skip to content

Commit e6dd20b

Browse files
committed
basket ball animation added with readme
1 parent 81d0f73 commit e6dd20b

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

basket ball animation/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
# basket ball animation
3+
4+
## 🚀 About Me
5+
I'm a full stack developer...you can follow me here -https://github.com/RAHULBAWA777
6+
7+
8+
## Run Locally
9+
10+
Clone the project
11+
12+
13+
Start the live server
14+
15+
16+
## Used By
17+
18+
This project is used by the following companies:
19+
20+
-https://github.com/Dezenix/frontend-html-css-js

basket ball animation/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>basketball Animation</title>
9+
<link rel="stylesheet" href="style.css">
10+
</head>
11+
12+
<body>
13+
<div class="container">
14+
<div class="ball"></div>
15+
<div class="shadow"></div>
16+
</div>
17+
</body>
18+
19+
</html>

basket ball animation/style.css

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
body{
2+
height: 100vh;
3+
display: flex;
4+
justify-content: center;
5+
align-items: center;
6+
7+
}
8+
.container {
9+
height: 200px;
10+
position: relative;
11+
}
12+
13+
.ball {
14+
width: 100px;
15+
height: 100px;
16+
background-color: orange;
17+
border-radius: 50%;
18+
border: 2px solid black;
19+
background-image: radial-gradient(circle at -10px 20px, transparent 47px, black 50px, black 25px, transparent 0), radial-gradient(circle at 110px 70px, transparent 47px, black 50px, transparent 0), linear-gradient(110deg, transparent 60px, black 63px, transparent 0), linear-gradient(18deg, transparent 56px, black 60px, transparent 0);
20+
animation: jump .5s cubic-bezier(.8, -.5, .2, 1.4) infinite alternate;
21+
22+
}
23+
24+
.shadow {
25+
width: 100px;
26+
height: 100px;
27+
border-radius: 50%;
28+
position: absolute;
29+
bottom: -50px;
30+
left: 0;
31+
z-index: -1;
32+
animation: jump2 .5s cubic-bezier(.8, -.5, .2, 1.4) infinite alternate;
33+
}
34+
35+
@keyframes jump {
36+
100% {
37+
transform: translate3d(0, 100px, 0);
38+
}
39+
}
40+
41+
@keyframes jump2 {
42+
0% {
43+
transform: rotateX(80deg);
44+
scale: 3d(.5, .5, 10);
45+
background-color: black;
46+
}
47+
48+
100% {
49+
transform: rotateX(80deg);
50+
scale: 3d(.5, .5, 10);
51+
background-color: black;
52+
}
53+
}

0 commit comments

Comments
 (0)