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 Teacher's Day</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class="title">Cheers to t <span>EACH</span> er who helped us bloom</h1>
<div class="container">
<div class="student-img"><img src="student-boy.png" alt="student image"></div>
<div class="chat">
<p class="msg msg-student" id="msg1">Good Morning, Sir</p>
<p class="msg msg-teacher" id="msg2">Good Morning</p>
<p class="msg msg-student" id="msg3">Happy Teacher's Day Sir</p>
<p class="msg msg-teacher" id="msg4">Thanks & Stay Blessed</p>
</div>
<div class="teacher-img"><img src="teacher-male.png" alt="teacher image"></div>
</div>
<script src="index.js"></script>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
width: 100%;
background-color: #000000;
opacity: 0;
transition: all 0.5s;
}
body::before {
background-image: url("https://images.unsplash.com/photo-1495727034151-8fdc73e332a8?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1465&q=80");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 100vh;
position: absolute;
content: "";
filter: blur(2.5px) grayscale(0.25);
z-index: -1;
}
.title {
text-align: center;
font-family: cursive;
font-weight: 700;
font-size: 48px;
color: #ffffff;
background-image: linear-gradient(to bottom, #000000, transparent);
padding: 1% 0 1.5% 0;
letter-spacing: 5px;
animation: titleAnim 4s infinite;
opacity: 0;
transition: all 0.5s;
}
.title span {
color: #ffffff;
margin: 0 -1%;
font-family: serif;
text-shadow: 5px 2.5px 7.5px #f0f0f0;
animation: highlightAnim 6s infinite;
}
@keyframes titleAnim {
0%, 100% {
text-shadow: -5px 2.5px 7.5px #2dd2ee, 5px 2.5px 7.5px #e96ce0;
}
50% {
text-shadow: 5px 2.5px 7.5px #2dd2ee, -5px 2.5px 7.5px #e96ce0;
}
}
@keyframes highlightAnim {
0%, 50%, 100% {
color: #ffffffd9;
text-shadow: 5px 2.5px 7.5px #e96ce0;
}
25%, 75% {
color: #ffffff;
text-shadow: 5px 2.5px 7.5px #2dd2ee;
}
}
.container {
position: absolute;
top: 75%;
left: 50%;
transform: translate(-50%, -75%);
display: flex;
width: 100%;
}
.student-img {
height: 75vh;
width: 30%;
text-align: center;
border-radius: 100%;
opacity: 0;
transition: all 0.5s;
}
.student-img::before {
content: "";
position: absolute;
top: 0;
left: 3.5%;
transform: translateX(-3.5%);
width: 25%;
height: 100%;
filter: blur(5px);
z-index: -1;
border-radius: 100%;
background-color: #AFF6CF40;
background-image: radial-gradient(#AFF6CF40, #9F98E840);
box-shadow: 0px 0px 1px 5px rgba(159, 152, 232, 0.25);
}
.student-img img {
height: 100%;
}
.chat {
margin: auto 0;
height: 50%;
width: 40%;
}
.msg {
margin: 10% 0;
padding: 2.5% 5%;
width: max-content;
color: #ffffff;
background-color: #000000;
font-family: monospace;
text-shadow: 1px 1px 1px #000000;
font-size: 24px;
opacity: 0;
transform: translateY(25px);
transition: all 0.5s;
}
.msg-student {
background-image: linear-gradient(to right, #aff6cf80, #9f98e880);
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-bottom-right-radius: 8px;
box-shadow: 1px 1px 1px 1px #ffffff;
text-align: left;
}
.msg-teacher {
background-image: linear-gradient(to left, #ffffff80, #d8896b80);
margin-left: auto;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
box-shadow: -1px 1px 1px 1px #ffffff;
text-align: right;
}
.teacher-img {
height: 75vh;
width: 30%;
text-align: center;
border-radius: 100%;
opacity: 0;
transition: all 0.5s;
}
.teacher-img::before {
content: "";
position: absolute;
top: 0;
left: 98%;
transform: translateX(-98%);
width: 25%;
height: 100%;
filter: blur(5px);
z-index: -1;
border-radius: 100%;
background-color: #ffffff40;
background-image: radial-gradient(#ffffff40, #d8896b40);
box-shadow: 0 0 1px 5px rgba(216, 137, 107, 0.25);
}
.teacher-img img {
height: 100%;
}
Below is the javascript code for this video.
index.js
setTimeout(() => document.body.style.opacity = "1", 1000);
setTimeout(() => document.querySelectorAll(".student-img").forEach((each) => each.style.opacity = "1"), 2000);
setTimeout(() => document.getElementById("msg1").style.cssText = `transform: translateY(0); opacity: 1`, 3000);
setTimeout(() => document.querySelectorAll(".teacher-img").forEach((each) => each.style.opacity = "1"), 4500);
setTimeout(() => document.getElementById("msg2").style.cssText = `transform: translateY(0); opacity: 1`, 5500);
setTimeout(() => document.getElementById("msg3").style.cssText = `transform: translateY(0); opacity: 1`, 7000);
setTimeout(() => document.getElementById("msg4").style.cssText = `transform: translateY(0); opacity: 1`, 8000);
setTimeout(() => document.querySelectorAll(".title").forEach((each) => each.style.opacity = "1"), 9500);
Thanks for visiting