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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beautiful Background Animation</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="text-container">A Visual Feast</div>
<div class="gradient-bg">
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="svg-filter">
<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8"
result="svg-filter" />
<feBlend in="SourceGraphic" in2="svg-filter" />
</filter>
</defs>
</svg>
<div class="gradients-container">
<div class="g1"></div>
<div class="g2"></div>
<div class="g3"></div>
<div class="g4"></div>
<div class="g5"></div>
<div class="interactive"></div>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100%;
background-color: #242424;
font-family: Arial, Helvetica, sans-serif;
overflow: hidden;
}
.text-container {
position: absolute;
top: 0;
left: 0;
display: flex;
height: 100vh;
width: 100%;
color: #ffffff;
justify-content: center;
align-items: center;
font-size: 96px;
opacity: 0.78;
text-shadow: 3px 3px 6px #00000080;
z-index: 10;
user-select: none;
}
.gradient-bg {
position: relative;
top: 0;
left: 0;
height: 100vh;
width: 100%;
background: linear-gradient(240deg, #603fefbf, #00008b);
overflow: hidden;
}
.gradient-bg .gradient-container {
height: 100%;
width: 100%;
filter: blur(42px);
}
.gradient-bg .g1, .gradient-bg .g2, .gradient-bg .g3, .gradient-bg .g4, .gradient-bg .g5 {
position: absolute;
top: calc(50% - 78% / 2);
left: calc(50% - 78% / 2);
height: 78%;
width: 78%;
opacity: 1;
mix-blend-mode: hard-light;
}
.gradient-bg .g1 {
background: radial-gradient(circle at center, rgba(255, 209, 220, 0.78) 0, rgba(255, 209, 220, 0) 50%) no-repeat;
transform-origin: center center;
animation: moveVerticalAnim 33s ease infinite;
}
.gradient-bg .g2 {
background: radial-gradient(circle at center, rgba(255, 119, 225, 0.78) 0, rgba(255, 119, 225, 0) 50%) no-repeat;
transform-origin: calc(50% - 420px);
animation: moveInCircleAnim 24s reverse infinite;
}
.gradient-bg .g3 {
top: calc(50% - 78% / 2 + 240px);
left: calc(50% - 78% / 2 - 510px);
background: radial-gradient(circle at center, rgba(255, 182, 193, 0.78) 0, rgba(255, 182, 193, 0) 50%) no-repeat;
transform-origin: calc(50% + 420px);
animation: moveInCircleAnim 42s linear infinite;
}
.gradient-bg .g4 {
background: radial-gradient(circle at center, rgba(231, 84, 128, 0.78) 0, rgba(231, 84, 128, 0) 50%) no-repeat;
transform-origin: calc(50% - 240px);
animation: moveHorizontalAnim 42s ease infinite;
opacity: 0.69;
}
.gradient-bg .g5 {
top: calc(50% - 78%);
left: calc(50% - 78%);
height: calc(78% * 2);
width: calc(78% * 2);
background: radial-gradient(circle at center, rgba(255, 209, 220, 0.78) 0, rgba(255, 209, 220, 0) 50%) no-repeat;
transform-origin: calc(50% - 780px) calc(50% + 240px);
animation: moveInCircleAnim 24s ease infinite;
}
.gradient-bg .interactive {
position: absolute;
top: -22.5%;
left: 0;
height: 100%;
width: 100%;
background: radial-gradient(circle at center, rgba(101, 0, 11, 0.78) 0, rgba(101, 0, 11, 0) 50%) no-repeat;
mix-blend-mode: hard-light;
opacity: 0.69;
}
@keyframes moveVerticalAnim {
0%, 100% {
transform: translateY(-50%) translateX(-25%);
}
50% {
transform: translateY(50%) translateX(25%);
}
}
@keyframes moveHorizontalAnim {
0%, 100% {
transform: translateX(-50%) translateY(-25%);
}
50% {
transform: translateX(50%) translateY(25%);
}
}
@keyframes moveInCircleAnim {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
Thanks for visiting