-
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
Showing
4 changed files
with
159 additions
and
13 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Candle Flicker</title> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="flex"> | ||
<div class="candle"> | ||
<div class="candle-wick"></div> | ||
</div> | ||
<div class="table"></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,122 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
} | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
background: -webkit-gradient( | ||
linear, | ||
left bottom, | ||
left top, | ||
from(rgba(112, 111, 247, 1)), | ||
to(rgba(0, 12, 54, 1)) | ||
); | ||
background: -o-linear-gradient( | ||
bottom, | ||
rgba(112, 111, 247, 1) 0%, | ||
rgba(0, 12, 54, 1) 100% | ||
); | ||
background: linear-gradient( | ||
0deg, | ||
rgba(112, 111, 247, 1) 0%, | ||
rgba(0, 12, 54, 1) 100% | ||
); | ||
} | ||
.flex { | ||
display: -webkit-box; | ||
display: -ms-flexbox; | ||
display: flex; | ||
-webkit-box-orient: vertical; | ||
-webkit-box-direction: normal; | ||
-ms-flex-direction: column; | ||
flex-direction: column; | ||
-webkit-box-align: center; | ||
-ms-flex-align: center; | ||
align-items: center; | ||
-webkit-box-pack: end; | ||
-ms-flex-pack: end; | ||
justify-content: flex-end; | ||
height: 100vh; | ||
} | ||
.candle { | ||
position: relative; | ||
width: 8rem; | ||
height: 11rem; | ||
background-color: hsl(0, 0%, 85%); | ||
border: 3px solid hsl(0, 0%, 0%); | ||
border-bottom: none; | ||
border-radius: 8px 8px 0 0; | ||
-webkit-box-shadow: inset 1rem 0 0.5rem hsl(0, 0%, 64%); | ||
box-shadow: inset 1rem 0 0.5rem hsl(0, 0%, 64%); | ||
} | ||
.candle::before { | ||
content: ''; | ||
display: block; | ||
position: absolute; | ||
top: -3rem; | ||
left: 52%; | ||
-webkit-transform: translateX(-50%); | ||
-ms-transform: translateX(-50%); | ||
transform: translateX(-50%); | ||
z-index: 10; | ||
background: -o-radial-gradient( | ||
circle, | ||
rgba(247, 197, 111, 1) 0%, | ||
rgba(245, 138, 11, 1) 100% | ||
); | ||
background: radial-gradient( | ||
circle, | ||
rgba(247, 197, 111, 1) 0%, | ||
rgba(245, 138, 11, 1) 100% | ||
); | ||
opacity: 0.9; | ||
height: 2.5rem; | ||
width: 2rem; | ||
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; | ||
-webkit-animation: 2s infinite flicker alternate; | ||
animation: 2s infinite flicker alternate; | ||
} | ||
.candle-wick { | ||
width: 0.25rem; | ||
height: 1.5rem; | ||
background-color: black; | ||
position: absolute; | ||
top: -1.5rem; | ||
left: 50%; | ||
} | ||
.table { | ||
width: 20rem; | ||
height: 1rem; | ||
background-color: black; | ||
} | ||
|
||
@-webkit-keyframes flicker { | ||
from { | ||
-webkit-box-shadow: 0 0 3px -3px #f7c56f; | ||
box-shadow: 0 0 3px -3px #f7c56f; | ||
-webkit-transform: translateX(-45%); | ||
transform: translateX(-45%); | ||
} | ||
to { | ||
-webkit-box-shadow: 0 0 3px 3px #f7c56f; | ||
box-shadow: 0 0 3px 3px #f7c56f; | ||
-webkit-transform: translateX(-55%); | ||
transform: translateX(-55%); | ||
} | ||
} | ||
|
||
@keyframes flicker { | ||
from { | ||
-webkit-box-shadow: 0 0 3px -3px #f7c56f; | ||
box-shadow: 0 0 3px -3px #f7c56f; | ||
-webkit-transform: translateX(-45%); | ||
transform: translateX(-45%); | ||
} | ||
to { | ||
-webkit-box-shadow: 0 0 3px 3px #f7c56f; | ||
box-shadow: 0 0 3px 3px #f7c56f; | ||
-webkit-transform: translateX(-55%); | ||
transform: translateX(-55%); | ||
} | ||
} |
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