-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zero to Mastery
committed
Oct 23, 2023
1 parent
0a21038
commit fb66c69
Showing
3 changed files
with
96 additions
and
96 deletions.
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>DAY 2 Challenge</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="menu no-animation"> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
</body> | ||
</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 |
---|---|---|
@@ -1,84 +1,84 @@ | ||
*{ | ||
margin:0; | ||
padding:0; | ||
box-sizing: border-box; | ||
background-color: #3faf82 | ||
} | ||
body{ | ||
min-height:100vh; | ||
display:flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.menu{ | ||
position: relative; | ||
display: flex; | ||
flex-direction:column; | ||
row-gap:16px; | ||
cursor: pointer; | ||
} | ||
.menu div{ | ||
width:100px; | ||
height:10px; | ||
background-color: white; | ||
box-shadow:0 4px 20px #00000030; | ||
border-radius: 2px; | ||
transition:all 0.3s; | ||
} | ||
.menu.active div:nth-child(2){ | ||
transform:scale(0); | ||
opacity:0; | ||
} | ||
.menu.active div:nth-child(1){ | ||
animation:bar1Anim 0.3s ease-in-out forwards; | ||
} | ||
@keyframes bar1Anim{ | ||
50%{ | ||
transform:translateY(24px); | ||
} | ||
100%{ | ||
transform:translateY(24px) rotateZ(45deg); | ||
} | ||
} | ||
.menu.active div:nth-child(3){ | ||
animation:bar2Anim 0.3s ease-in-out forwards; | ||
} | ||
@keyframes bar2Anim{ | ||
50%{ | ||
transform:translateY(-24px); | ||
} | ||
100%{ | ||
transform:translateY(-24px) rotateZ(135deg); | ||
} | ||
} | ||
.menu div:nth-child(1){ | ||
animation: bar1revAnim 0.3s ease-in-out; | ||
} | ||
@keyframes bar1revAnim{ | ||
0%{ | ||
transform:translateY(24px) rotateZ(45deg); | ||
} | ||
50%{ | ||
transform:translateY(24px) rotateZ(0deg); | ||
} | ||
100%{ | ||
transform: translateY(0px); | ||
} | ||
} | ||
.menu div:nth-child(3){ | ||
animation: bar3revAnim 0.3s ease-in-out; | ||
} | ||
@keyframes bar3revAnim{ | ||
0%{ | ||
transform:translateY(-24px) rotateZ(135deg); | ||
} | ||
50%{ | ||
transform:translateY(-24px) rotateZ(0deg); | ||
} | ||
100%{ | ||
transform: translateY(0px); | ||
} | ||
} | ||
.menu.no-animation div{ | ||
animation: none; | ||
} | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
background-color: #3faf82; | ||
} | ||
body { | ||
min-height: 100vh; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.menu { | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 16px; | ||
cursor: pointer; | ||
} | ||
.menu div { | ||
width: 100px; | ||
height: 10px; | ||
background-color: white; | ||
box-shadow: 0 4px 20px #00000030; | ||
border-radius: 2px; | ||
transition: all 0.3s; | ||
} | ||
.menu.active div:nth-child(2) { | ||
transform: scale(0); | ||
opacity: 0; | ||
} | ||
.menu.active div:nth-child(1) { | ||
animation: bar1Anim 0.3s ease-in-out forwards; | ||
} | ||
@keyframes bar1Anim { | ||
50% { | ||
transform: translateY(24px); | ||
} | ||
100% { | ||
transform: translateY(24px) rotateZ(45deg); | ||
} | ||
} | ||
.menu.active div:nth-child(3) { | ||
animation: bar2Anim 0.3s ease-in-out forwards; | ||
} | ||
@keyframes bar2Anim { | ||
50% { | ||
transform: translateY(-24px); | ||
} | ||
100% { | ||
transform: translateY(-24px) rotateZ(135deg); | ||
} | ||
} | ||
.menu div:nth-child(1) { | ||
animation: bar1revAnim 0.3s ease-in-out; | ||
} | ||
@keyframes bar1revAnim { | ||
0% { | ||
transform: translateY(24px) rotateZ(45deg); | ||
} | ||
50% { | ||
transform: translateY(24px) rotateZ(0deg); | ||
} | ||
100% { | ||
transform: translateY(0px); | ||
} | ||
} | ||
.menu div:nth-child(3) { | ||
animation: bar3revAnim 0.3s ease-in-out; | ||
} | ||
@keyframes bar3revAnim { | ||
0% { | ||
transform: translateY(-24px) rotateZ(135deg); | ||
} | ||
50% { | ||
transform: translateY(-24px) rotateZ(0deg); | ||
} | ||
100% { | ||
transform: translateY(0px); | ||
} | ||
} | ||
.menu.no-animation div { | ||
animation: none; | ||
} |
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