The content on this website, including videos and code examples, is for educational purposes only. All demonstrations and designs are fictional and created to illustrate coding techniques. Any resemblance to existing websites or brands is purely coincidental.
The creators and administrators of this website do not claim ownership or affiliation with any existing websites or companies. Users are encouraged to use the information responsibly for learning purposes. Liability for any misuse of the content provided is not accepted.
Below is the html code for this video.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Happy Diya-lit Diwali</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="text">Happy Diwali</div>
<div class="container">
<div class="diya">
<div class="diya-top"></div>
<div class="diya-left"></div>
<div class="diya-right"></div>
</div>
<div class="flame">
<div class="thread"></div>
<div class="flame-top"></div>
<div class="blink"></div>
<div class="flame-bottom"></div>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
@import url('https://fonts.googleapis.com/css2?family=Agbalumo&display=swap');
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100%;
background: #000000;
}
.text {
position: absolute;
top: 50%;
right: 0;
width: 50%;
transform: translateY(-50%);
color: #f79e1f;
font-size: 15vw;
font-family: 'Agbalumo', cursive;
line-height: 1.25;
animation: textColorAnim 2s alternate-reverse infinite, textJellyAnim 2s ease infinite;
}
@keyframes textColorAnim {
0% {
color: #f79e1f;
text-shadow: #f79e1f 0 0 30px, #f79e1f 1px 0 10px;
}
50% {
color: #e5c654;
text-shadow: #e5c654 0 0 30px, #e5c654 1px 0 10px;
}
100% {
color: #ffe45e;
text-shadow: #ffe45e 0 0 30px, #ffe45e 1px 0 10px;
}
}
@keyframes textJellyAnim {
11%, 100% {
transform: translateY(-50%);
}
22% {
transform: translateY(-50%) skewX(-12.5deg) skewY(-12.5deg);
}
33% {
transform: translateY(-50%) skewX(6.25deg) skewY(6.25deg);
}
44% {
transform: translateY(-50%) skewX(-3.125deg) skewY(-3.125deg);
}
55% {
transform: translateY(-50%) skewX(1.5625deg) skewY(1.5625deg);
}
66% {
transform: translateY(-50%) skewX(-0.78125deg) skewY(-0.78125deg);
}
77% {
transform: translateY(-50%) skewX(0.390625deg) skewY(0.390625deg);
}
88% {
transform: translateY(-50%) skewX(-0.1953125deg) skewY(-0.1953125deg);
}
}
.container {
position: relative;
top: 75%;
left: -30%;
transform: translateY(-75%);
display: flex;
align-items: center;
justify-content: center;
}
.diya {
display: flex;
width: 440px;
margin-top: 15px;
z-index: 1;
}
.diya-left {
height: 130px;
width: 160px;
background: #9d452f;
border-top: 16px solid #5d351f;
border-radius: 16px 0 0 100%;
}
.diya-right {
height: 130px;
width: 280px;
background: #9d452f;
border-top: 16px solid #5d351f;
border-radius: 0 16px 100% 0;
}
.diya-top {
position: absolute;
height: 30px;
width: 420px;
background: linear-gradient(to right, #591900, #ba3e22, #f56f2d);
border: 16px solid #5d351f;
border-top: 20px solid #5d351f;
border-radius: 50%;
margin-top: -24px;
margin-left: -8px;
}
.flame {
position: relative;
display: flex;
margin-top: -240px;
margin-left: -32px;
}
.thread {
position: absolute;
height: 70px;
width: 20px;
background: linear-gradient(#d6994a, #4b232c, #121212, #000000, #e8bb31 95%);
transform: rotateZ(15deg);
transform-origin: 50% 100%;
border-radius: 40% 40% 30% 0;
z-index: 3;
}
.flame-bottom {
position: absolute;
height: 60px;
width: 30px;
background: #0085ffbf;
transform: rotateZ(10deg);
transform-origin: 50% 100%;
border-radius: 50% 50% 35% 35%;
box-shadow: 0 0 10px 2px #0085ff80;
margin-top: -30px;
margin-left: 4px;
z-index: 2;
animation: glowAndShrink 16s infinite;
}
.flame-bottom::before {
content: "";
display: block;
height: 100%;
width: 70%;
background: #00000040;
border-radius: 50%;
margin-top: 50%;
margin-left: 15%;
}
.flame-top {
position: absolute;
height: 180px;
width: 50px;
background: linear-gradient(to top, #86a0b9, #afa300, #ffffff);
transform: rotateZ(12deg);
transform-origin: 50% 100%;
border-radius: 50% 50% 25% 25%;
box-shadow: 0 0 100px 10px #dea872, 0 0 200px 80px #301200, inset 0 0 8px 0 #0085ff80;
margin-top: -130px;
margin-left: -10px;
z-index: 1;
animation: glowAndShrink 16s infinite;
}
@keyframes glowAndShrink {
20% {
transform: scaleY(1.1) rotateZ(20deg);
}
40% {
transform: scaleY(1.2) rotateZ(18deg);
}
70% {
transform: scaleY(0.9) rotateZ(5deg);
}
90% {
transform: scaleY(0.95) rotateZ(14deg);
}
100% {
transform: scaleY(1) rotateZ(15deg);
}
}
.blink {
position: absolute;
height: 360px;
width: 240px;
background: radial-gradient(#5c3b21, #150b04);
transform: rotate(25deg);
transform-origin: 50% 100%;
border-radius: 50%;
box-shadow: 0 0 200px 100px #301909;
margin-top: -180px;
margin-left: -120px;
opacity: 0.25;
z-index: 0;
animation: blinkAnim 0.25s infinite;
}
@keyframes blinkAnim {
50% {
opacity: 0;
}
100% {
opacity: 0.25;
}
}
Thanks for visiting