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>Wedding Invitation #2</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container header">
<h3>You're invited to...</h3>
<h1>Bride & Groom's Wedding</h1>
</div>
<ul class="container navbar">
<li class="circle-behind"><a href="#our-story">Our Love Story</a></li>
<li class="circle-behind"><a href="#reminder">Time in Big Day</a></li>
<li class="circle-behind"><a href="#wedding-info">The Wedding</a></li>
</ul>
<div class="container story" id="our-story">
<div class="img-container">
<img src="https://images.unsplash.com/photo-1480623940435-62a1340b08c6?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80"
alt="couple image 1">
</div>
<div class="text-container">
<h2>Our Love Story</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus incidunt ex nesciunt nulla nihil,
corrupti blanditiis repellat tempora quo maiores! In, sed. Quia rem, amet labore voluptates nemo quaerat
eaque?</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. At totam aliquid iusto alias recusandae
perferendis iste architecto assumenda. Dolorum amet provident reiciendis culpa sunt repudiandae, a animi
voluptatum eos optio.</p>
</div>
</div>
<div class="container reminder-container" id="reminder">
<h2>Time Remaining for Big Day</h2>
<div class="container reminder" id="reminder-clock">
<div>
<span class="days">00</span>
<div>Days</div>
</div>
<div>
<span class="hours">00</span>
<div>Hours</div>
</div>
<div>
<span class="minutes">00</span>
<div>Minutes</div>
</div>
<div>
<span class="seconds">00</span>
<div>Seconds</div>
</div>
</div>
</div>
<div class="container wedding" id="wedding-info">
<div class="text-container">
<h2 class="text-center">The Wedding</h2>
<div class="text-wrapper">
<div>
<h4>When</h4>
<h3>Date & Time</h3>
</div>
<div>
<h4>Where</h4>
<h3>Place</h3>
</div>
<div>
<h4>How to get there</h4>
<h3>Directions</h3>
</div>
</div>
</div>
<div class="img-container">
<img src="https://images.unsplash.com/photo-1494955870715-979ca4f13bf0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80"
alt="couple image 2">
</div>
</div>
<script src="index.js"></script>
</body>
</html>
Below is the css code for this video.
style.css
@import url('https://fonts.googleapis.com/css2?family=Birthstone&display=swap');
* {
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
height: 100vh;
width: 100%;
background: #fbe7cc;
color: #783955;
font-family: 'Birthstone', cursive;
font-size: x-large;
letter-spacing: 1px;
}
img {
width: 100%;
}
.container {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
padding: 2% 0;
}
.header {
flex-direction: column;
}
.header h4 {
margin: 5% 0;
}
.navbar {
justify-content: space-evenly;
list-style: none;
}
.navbar li a {
position: relative;
color: #783955;
text-decoration: none;
border-bottom: 2px dashed #f6cb92;
padding-bottom: 2px;
z-index: 0;
cursor: pointer;
}
.navbar li a:hover {
border: none;
padding-bottom: 0;
}
.navbar li.circle-behind a::before, .navbar li.circle-behind a::after {
content: "";
position: absolute;
top: 18px;
left: 50%;
height: 50px;
width: 50px;
background: transparent;
border: 4px solid #f6cb92;
border-radius: 50%;
transform: translate(-50%, -50%) scale(0.75);
z-index: -1;
transition: all 0.5s;
opacity: 0;
}
.navbar li.circle-behind a::after {
border: 2px solid #f6cb92;
transition: all 0.25s;
}
.navbar li.circle-behind a:hover::before {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.navbar li.circle-behind a:hover::after {
opacity: 1;
transform: translate(-50%, -50%) scale(1.5);
}
.story, .wedding {
width: 100%;
justify-content: space-evenly;
margin: auto;
padding: 2.5% 0;
}
.wedding {
background: #b9dbcb;
}
.story .img-container, .wedding .img-container {
width: 45%;
border-radius: 16px;
padding: 16px;
box-shadow: 12.5px 12.5px 25px #42280540, -5px -5px 15px #4228051a, inset -2.5px -2.5px 7.5px #42280580;
}
.wedding .img-container {
box-shadow: -12.5px -12.5px 25px #182f2440, 5px 5px 15px #182f241a, inset 2.5px 2.5px 7.5px #182f2480;
}
.story .img-container img, .wedding .img-container img {
border-radius: 8px;
}
.story .text-container, .wedding .text-container {
width: 45%;
}
.story .text-container p, .wedding .text-container p {
width: 100%;
text-align: justify;
margin: 2.5% 0;
}
.reminder-container {
flex-direction: column;
background-image: linear-gradient(#28282880, transparent), url(https://images.unsplash.com/photo-1512180958517-a7e591660832?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1374&q=80);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: #fbe7cc;
animation: bgRollingAnim 5.5s ease infinite;
}
@keyframes bgRollingAnim {
0%, 100% {
background-position: top;
}
22.5%, 27.5%, 72.5%, 77.5% {
background-position: center;
}
50% {
background-position: bottom;
}
}
.reminder {
justify-content: space-evenly;
}
.reminder div {
width: max-content;
background: #80808040;
border: 1px solid #80808040;
border-radius: 16px;
box-shadow: 0 0 10px 1px #00000040;
backdrop-filter: blur(10px);
padding: 32px;
}
.reminder div span {
display: block;
width: 100%;
font-size: xx-large;
text-align: center;
}
.reminder div div {
background: transparent;
border: none;
box-shadow: none;
backdrop-filter: blur(0);
padding-left: 0;
padding-bottom: 0;
padding-right: 0;
}
.text-container .text-wrapper {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
text-align: center;
margin-top: 2.5%;
}
.text-container .text-wrapper div {
width: 33%;
}
.text-center {
text-align: center;
}
Below is the javascript code for this video.
index.js
function getRemainingTime(et) {
var dt = Date.parse(et) - Date.parse(new Date());
var seconds = Math.floor((dt / 1000) % 60);
var minutes = Math.floor((dt / 1000 / 60) % 60);
var hours = Math.floor((dt / (1000 * 60 * 60)) % 24);
var days = Math.floor(dt / (1000 * 60 * 60 * 24));
return { days, hours, minutes, seconds };
}
function initRemainingTime(id, endTime) {
var clock = document.getElementById(id);
var daysSpan = clock.querySelector('.days');
var hoursSpan = clock.querySelector('.hours');
var minutesSpan = clock.querySelector('.minutes');
var secondsSpan = clock.querySelector('.seconds');
function updateRemainingTime() {
var t = getRemainingTime(endTime);
daysSpan.innerHTML = ('0' + t.days).slice(-2);
hoursSpan.innerHTML = ('0' + t.hours).slice(-2);
minutesSpan.innerHTML = ('0' + t.minutes).slice(-2);
secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);
if (t.days <= 0 && t.hours <= 0 && t.minutes <= 0 && t.seconds <= 0) { clearInterval(timeInterval); }
}
updateRemainingTime();
var timeInterval = setInterval(updateRemainingTime, 1000);
}
var timeForBigDay = new Date(Date.parse(new Date()) + 1 * 24 * 60 * 60 * 1000);
initRemainingTime('reminder-clock', timeForBigDay);
Thanks for visiting