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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Happy Valentine's Week</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Happy Valentine's Week</h1>
<h3>"The best thing to hold onto in life is each other."</h3>
<div class="whole-heart">
<div class="piece-of-heart"></div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
body {
background-color: #ee8c68;
background-image: linear-gradient(45deg, #EE8C68, #EB6B9D);
overflow: hidden;
width: 100%;
height: 100vh;
font-family: cursive;
}
h1 {
color: #8B0000;
position: absolute;
bottom: 10%;
width: 100%;
text-align: center;
letter-spacing: 1px;
}
h3 {
color: #660000;
position: absolute;
top: 10%;
transform: translateY(-10%);
width: 100%;
text-align: center;
font-size: 1.5em;
letter-spacing: 2px;
}
.whole-heart {
position: absolute;
left: 50%;
top: 50%;
box-shadow: 0px 0 0 7px #FF160C, 18px 0 0 7px #FF160C, 36px 0 0 7px #FF160C, 108px 0 0 7px #FF160C, -18px 18px 0 7px #FF160C,
0px 18px 0 7px #FF160C, 18px 18px 0 7px #FF160C, 36px 18px 0 7px #FF160C, 54px 18px 0 7px #FF160C, 90px 18px 0 7px #FF160C,
108px 18px 0 7px #FF160C, 126px 18px 0 7px #FF160C, 162px 18px 0 7px #FF160C, -18px 36px 0 7px #FF160C, 0px 36px 0 7px #FF160C,
18px 36px 0 7px #FF160C, 36px 36px 0 7px #FF160C, 54px 36px 0 7px #FF160C, 72px 36px 0 7px #FF160C, 90px 36px 0 7px #FF160C,
108px 36px 0 7px #FF160C, 126px 36px 0 7px #FF160C, 162px 36px 0 7px #FF160C, -18px 54px 0 7px #FF160C, 0px 54px 0 7px #FF160C,
18px 54px 0 7px #FF160C, 36px 54px 0 7px #FF160C, 54px 54px 0 7px #FF160C, 72px 54px 0 7px #FF160C, 90px 54px 0 7px #FF160C,
108px 54px 0 7px #FF160C, 126px 54px 0 7px #FF160C, 144px 54px 0 7px #FF160C, 162px 54px 0 7px #FF160C, 0px 72px 0 7px #FF160C,
18px 72px 0 7px #FF160C, 36px 72px 0 7px #FF160C, 54px 72px 0 7px #FF160C, 72px 72px 0 7px #FF160C, 90px 72px 0 7px #FF160C,
108px 72px 0 7px #FF160C, 126px 72px 0 7px #FF160C, 144px 72px 0 7px #FF160C, 18px 90px 0 7px #FF160C, 36px 90px 0 7px #FF160C,
54px 90px 0 7px #FF160C, 72px 90px 0 7px #FF160C, 90px 90px 0 7px #FF160C, 108px 90px 0 7px #FF160C, 126px 90px 0 7px #FF160C,
36px 108px 0 7px #FF160C, 54px 108px 0 7px #FF160C, 72px 108px 0 7px #FF160C, 90px 108px 0 7px #FF160C, 108px 108px 0 7px #FF160C,
54px 126px 0 7px #FF160C, 72px 126px 0 7px #FF160C, 90px 126px 0 7px #FF160C, 72px 144px 0 7px #FF160C;
margin-left: -71px;
margin-top: -50px;
animation: incompleteHeart 10s linear;
}
.whole-heart .piece-of-heart {
position: absolute;
left: 50%;
top: 50%;
box-shadow: 126px 0px 0 7px #FF160C, 144px 0px 0 7px #FF160C, 144px 18px 0 7px #FF160C, 144px 36px 0 7px #FF160C;
animation: completeHeart 9s linear;
}
@keyframes incompleteHeart {
0%, 90% {
box-shadow: 0px 0 0 7px #DDD, 18px 0 0 7px #DDD, 36px 0 0 7px #DDD, 108px 0 0 7px #DDD, -18px 18px 0 7px #DDD, 0px 18px 0 7px #DDD,
18px 18px 0 7px #DDD, 36px 18px 0 7px #DDD, 54px 18px 0 7px #DDD, 90px 18px 0 7px #DDD, 108px 18px 0 7px #DDD, 126px 18px 0 7px #DDD,
162px 18px 0 7px #DDD, -18px 36px 0 7px #DDD, 0px 36px 0 7px #DDD, 18px 36px 0 7px #DDD, 36px 36px 0 7px #DDD, 54px 36px 0 7px #DDD,
72px 36px 0 7px #DDD, 90px 36px 0 7px #DDD, 108px 36px 0 7px #DDD, 126px 36px 0 7px #DDD, 162px 36px 0 7px #DDD, -18px 54px 0 7px #DDD,
0px 54px 0 7px #DDD, 18px 54px 0 7px #DDD, 36px 54px 0 7px #DDD, 54px 54px 0 7px #DDD, 72px 54px 0 7px #DDD, 90px 54px 0 7px #DDD,
108px 54px 0 7px #DDD, 126px 54px 0 7px #DDD, 144px 54px 0 7px #DDD, 162px 54px 0 7px #DDD, 0px 72px 0 7px #DDD, 18px 72px 0 7px #DDD,
36px 72px 0 7px #DDD, 54px 72px 0 7px #DDD, 72px 72px 0 7px #DDD, 90px 72px 0 7px #DDD, 108px 72px 0 7px #DDD, 126px 72px 0 7px #DDD,
144px 72px 0 7px #DDD, 18px 90px 0 7px #DDD, 36px 90px 0 7px #DDD, 54px 90px 0 7px #DDD, 72px 90px 0 7px #DDD, 90px 90px 0 7px #DDD,
108px 90px 0 7px #DDD, 126px 90px 0 7px #DDD, 36px 108px 0 7px #DDD, 54px 108px 0 7px #DDD, 72px 108px 0 7px #DDD, 90px 108px 0 7px #DDD,
108px 108px 0 7px #DDD, 54px 126px 0 7px #DDD, 72px 126px 0 7px #DDD, 90px 126px 0 7px #DDD, 72px 144px 0 7px #DDD;
}
}
@keyframes completeHeart {
0%, 24% {
box-shadow: 126px -72px 0 7px #FF160C, 144px -72px 0 7px #FF160C, 144px -54px 0 7px #FF160C, 144px -36px 0 7px #FF160C;
}
25%, 49% {
box-shadow: 126px -54px 0 7px #FF160C, 144px -54px 0 7px #FF160C, 144px -36px 0 7px #FF160C, 144px -18px 0 7px #FF160C;
}
50%, 74% {
box-shadow: 126px -36px 0 7px #FF160C, 144px -36px 0 7px #FF160C, 144px -18px 0 7px #FF160C, 144px 0px 0 7px #FF160C;
}
75%, 99% {
box-shadow: 126px -18px 0 7px #FF160C, 144px -18px 0 7px #FF160C, 144px 0px 0 7px #FF160C, 144px 18px 0 7px #FF160C;
}
100% {
box-shadow: 126px 0px 0 7px #FF160C, 144px 0px 0 7px #FF160C, 144px 18px 0 7px #FF160C, 144px 36px 0 7px #FF160C;
}
}
Thanks for visiting