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</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
<div class="confetti"></div>
</div>
<div class="container">
<div class="img-container">
<img src="https://images.unsplash.com/photo-1615039666131-964929ad0f1e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80"
alt="couple-image">
</div>
<div class="text-container">
<h3>Join us in celebrating our love!</h3>
<h1>Bride <span>&</span> Groom</h1>
<h3>Wedding on</h3>
<h2>Date</h2>
<h4>at</h4>
<h2>Time</h2>
<h4>at</h4>
<h2>Place.</h2>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100%;
background-image: repeating-linear-gradient(-55deg, #519694, #519694 16px, #7cbcb6 16px, #387f75 32px);
color: #ecedf0;
background-size: 200% 200%;
animation: bgAnim 19s linear infinite;
overflow: hidden;
}
@keyframes bgAnim {
100% {
background-position: 100% 100%;
}
}
.confetti {
position: absolute;
top: -100%;
display: flex;
height: 28px;
width: 10px;
}
.confetti:nth-child(1) {
left: 10%;
background-color: #acc5cf;
animation: fallingConfettiAnim1 1.5s linear infinite;
}
.confetti:nth-child(2) {
left: 20%;
background-color: #8ed399;
animation: fallingConfettiAnim1 1.3s 0.2s linear infinite;
}
.confetti:nth-child(3) {
left: 30%;
background-color: #eddadd;
animation: fallingConfettiAnim1 1.4s 0.4s linear infinite;
}
.confetti:nth-child(4) {
left: 40%;
background-color: #cbc3e3;
animation: fallingConfettiAnim1 1.7s 0.1s linear infinite;
}
.confetti:nth-child(5) {
left: 50%;
background-color: #fcf4a3;
animation: fallingConfettiAnim1 1.6s 0.7s linear infinite;
}
.confetti:nth-child(6) {
left: 60%;
background-color: #acc5cf;
animation: fallingConfettiAnim1 1.4s 0.3s linear infinite;
}
.confetti:nth-child(7) {
left: 70%;
background-color: #8ed399;
animation: fallingConfettiAnim1 1.1s 0.5s linear infinite;
}
.confetti:nth-child(8) {
left: 80%;
background-color: #eddadd;
animation: fallingConfettiAnim1 1.4s 0.9s linear infinite;
}
.confetti:nth-child(9) {
left: 90%;
background-color: #cbc3e3;
animation: fallingConfettiAnim1 1.9s 0.6s linear infinite;
}
.confetti:nth-child(10) {
left: 100%;
background-color: #fcf4a3;
animation: fallingConfettiAnim1 1.2s 0.8s linear infinite;
}
@keyframes fallingConfettiAnim1 {
0% {
top: -100%;
transform: rotate(0deg) rotateY(-90deg);
opacity: 1;
}
100% {
top: 100%;
transform: rotate(360deg) rotateY(180deg);
opacity: 0.5;
}
}
.confetti:nth-child(11) {
left: 5%;
background-color: #acc5cf;
animation: fallingConfettiAnim2 1.5s linear infinite;
}
.confetti:nth-child(12) {
left: 15%;
background-color: #8ed399;
animation: fallingConfettiAnim2 1.3s 0.2s linear infinite;
}
.confetti:nth-child(13) {
left: 25%;
background-color: #eddadd;
animation: fallingConfettiAnim2 1.4s 0.4s linear infinite;
}
.confetti:nth-child(14) {
left: 35%;
background-color: #cbc3e3;
animation: fallingConfettiAnim2 1.7s 0.1s linear infinite;
}
.confetti:nth-child(15) {
left: 45%;
background-color: #fcf4a3;
animation: fallingConfettiAnim2 1.6s 0.7s linear infinite;
}
.confetti:nth-child(16) {
left: 55%;
background-color: #acc5cf;
animation: fallingConfettiAnim2 1.4s 0.3s linear infinite;
}
.confetti:nth-child(17) {
left: 65%;
background-color: #8ed399;
animation: fallingConfettiAnim2 1.1s 0.5s linear infinite;
}
.confetti:nth-child(18) {
left: 75%;
background-color: #eddadd;
animation: fallingConfettiAnim2 1.4s 0.9s linear infinite;
}
.confetti:nth-child(19) {
left: 85%;
background-color: #cbc3e3;
animation: fallingConfettiAnim2 1.9s 0.6s linear infinite;
}
.confetti:nth-child(20) {
left: 95%;
background-color: #fcf4a3;
animation: fallingConfettiAnim2 1.2s 0.8s linear infinite;
}
@keyframes fallingConfettiAnim2 {
0% {
top: -100%;
transform: rotate(0deg) rotateY(90deg);
opacity: 1;
}
100% {
top: 100%;
transform: rotate(-360deg) rotateY(-180deg);
opacity: 0.5;
}
}
.container {
display: flex;
height: 100%;
width: 100%;
margin: auto;
}
.img-container, .text-container {
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
margin: auto;
}
.img-container {
display: grid;
width: 33%;
grid-auto-flow: column;
place-content: center;
gap: 40px;
}
.img-container img {
--gap: 10% /45% 45% no-repeat linear-gradient(#000 0 0);
--placing: left var(--coord, 0%) top var(--gap), bottom var(--coord, 0%) left var(--gap),
top var(--coord, 0%) right var(--gap), right var(--coord, 0%) bottom var(--gap);
height: 100%;
width: 100%;
-webkit-mask: var(--placing);
filter: grayscale() blur(2.8px);
z-index: 2;
cursor: pointer;
opacity: 0.75;
transition: all 0.5s linear;
}
.img-container img:hover {
--coord: 10%;
filter: grayscale(0) blur(0);
opacity: 1;
}
.text-container {
width: 66%;
}
.text-container h1 {
color: #fde8d5;
font-size: calc(100px - 1vw);
font-family: cursive;
letter-spacing: 2px;
text-shadow: none;
margin: 2.5% 0;
animation: openingTitleAnim 3s ease forwards;
}
@keyframes openingTitleAnim {
0% {
opacity: 0;
}
25% {
transform: scale(1.5);
text-shadow: 0 10px 10px #192e2d;
}
50% {
transform: scale(1.25);
}
75% {
transform: scale(1.5);
text-shadow: 0 -10px 10px #192e2d;
}
100% {
opacity: 1;
}
}
.text-container h1 span {
color: #fed2b7;
font-size: calc(82px -1vw);
}
.text-container h2, .text-container h3, .text-container h4 {
animation: beHiddenFirst 3s forwards, shadowAnim 3s 3s infinite;
}
@keyframes beHiddenFirst {
0%, 90% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes shadowAnim {
0%, 100% {
color: #ecedf0;
text-shadow: 10px 0 10px #192e2d;
}
50% {
color: #ffc6cd;
text-shadow: -10px 0 10px #192e2d;
}
}
.text-container h2 {
font-size: calc(64px - 1vw);
font-family: serif;
margin: 1.5% 0;
}
.text-container h3 {
font-size: calc(36px - 0.25vw);
font-family: fantasy;
}
.text-container h4 {
font-size: calc(28px + 0.25vw);
font-family: monospace;
}
Thanks for visiting