Skip to content

Commit

Permalink
Merge pull request #398 from gaurovgiri/feat/pendulum
Browse files Browse the repository at this point in the history
add pendulum
  • Loading branch information
aayush105 committed Oct 28, 2023
2 parents bf7cff4 + 93f82a1 commit 2466f2f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Pendulum/index.html
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>
54 changes: 54 additions & 0 deletions Pendulum/pendulum.css
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);
}
}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,14 +815,23 @@ Please be aware that the demos may exhibit significant accessibility issues, suc
=======
&nbsp;

## <a id="Pendulum"></a>Pendulum

![img_source](images/pendulum.png)

**[⬆ back to top](#quick-links)**
=======
&nbsp;


## <a id="SlicedButton"></a>SlicedButton

![img_source](Button/Sliced-Button/sliced_button.gif)

**[⬆ back to top](#quick-links)**

=======
&nbsp;

---

## Contributors
Expand Down
Binary file added images/pendulum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2466f2f

Please sign in to comment.