-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from gaurovgiri/feat/pendulum
add pendulum
- Loading branch information
Showing
4 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="pendulum.css"> | ||
</head> | ||
<body> | ||
<div class="pendulum"> | ||
<div class="bell"> | ||
<div class="clapper"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
} | ||
|
||
.pendulum { | ||
width: 10px; | ||
height: 200px; | ||
background-color: #222; | ||
position: relative; | ||
border-radius: 5px; | ||
transform-origin: top center; | ||
animation: swing 2s infinite ease-in-out; | ||
} | ||
|
||
.bell { | ||
width: 50px; | ||
height: 50px; | ||
background-color: #777; | ||
border-radius: 50%; | ||
position: absolute; | ||
bottom: 0; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
display: flex; | ||
justify-content: center; | ||
align-items: flex-start; | ||
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
.clapper { | ||
width: 5px; | ||
height: 60px; | ||
background-color: #444; | ||
border-radius: 5px; | ||
transform-origin: 50% 0; | ||
position: relative; | ||
animation: swing 2s infinite ease-in-out; | ||
} | ||
|
||
@keyframes swing { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
50% { | ||
transform: rotate(10deg); | ||
} | ||
100% { | ||
transform: rotate(0deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.