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 Friendship Day Greeting</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
<div class="card">
<div class="card-content">
<h1>Happy Friendship Day</h1>
<p>🎉 to all 🎉</p>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<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 {
display: flex;
height: 100vh;
width: 100%;
background: radial-gradient(ellipse at center, #f5d020 0%, #f53803 100%);
perspective: 1000px;
transform-style: preserve-3d;
font-family: cursive;
}
.card {
position: relative;
display: flex;
height: 250px;
width: 400px;
background: linear-gradient(to bottom, #0054b4 0%, #0054b4 75%, #add8e6 75%, #add8e6 100%);
margin: auto;
padding: 30px;
border-radius: 4px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
transform: translateZ(7em);
transform-style: preserve-3d;
pointer-events: none;
backface-visibility: hidden;
}
.card::after {
content: "";
position: absolute;
left: 0;
bottom: -50px;
height: 10px;
width: 100%;
border-radius: 50%;
box-shadow: 0 30px 20px rgba(0, 0, 0, 0.5);
}
.card .card-content {
margin: auto;
text-align: center;
transform-style: preserve-3d;
}
.card h1 {
color: #f0f8ff;
font-size: 40px;
transform: translateZ(100px);
}
.card p {
display: block;
margin-top: 15px;
color: #002147;
font-size: 30px;
font-family: monospace;
transform: translateZ(80px);
}
section {
position: fixed;
width: 5vmin;
height: 5vmin;
border-radius: 50%;
animation: poppingBalls cubic-bezier(0.75, 0.025, 1, 1) infinite reverse;
}
@keyframes poppingBalls {
0% {
opacity: 0;
}
70% {
opacity: 1;
}
100% {
transform: translate(50vw, 50vh);
}
}
Below is the scss code for this video.
index.scss
$ballColors: #d02e0c, #f9ff60, #cdedfd, #ffcfd2, #e5f77d, #dc9e82;
section {
@for $i from 1 to 100 {
&:nth-child(#{$i}) {
$ballColor: ceil(random() * 6);
background-color: nth($ballColors, $ballColor);
$x: random() * 100vw;
$y: random() * 100vh;
transform: translate($x, $y);
animation-duration: random() * 2s + 1s;
animation-delay: random() * -2s;
}
}
}
Below is the javascript code for this video.
index.js
var card = $(".card");
$(document).on("mousemove", function (e) {
var ax = -($(window).innerWidth() / 2 - e.pageX) / 20;
var ay = ($(window).innerHeight() / 2 - e.pageY) / 10;
card.attr("style", "transform: rotateY(" + ax + "deg) rotateX(" + ay + "deg) translateZ(7em)");
});
Thanks for visiting