Source code:
}<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Pulsating Dots Loader</title>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #1739f5, #000310);
font-family: Arial, sans-serif;
overflow: hidden;
}
/* Loader styles */
.loader-container {
display: flex;
justify-content: space-between;
align-items: center;
width: 100px;
}
.dot {
width: 20px;
height: 20px;
background: red;
border-radius: 50%;
animation: pulse 1.2s infinite;
}
.dot:nth-child(2) {
animation-delay: 0.2s;
background: yellow;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
background: green;
}
/* Main page content */
.main-content {
position: absolute;
display: none;
text-align: center;
color: white;
font-size: 2rem;
animation: fadeIn 1s ease-out forwards;
}
/* Keyframes */
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 0.6;
}
50% {
transform: scale(1.5);
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Hiding loader and showing content */
/* body.loaded .loader-container {
display: none;
}
body.loaded .main-content {
display: block;
}*/
</style>
</head>
<body>
<div class=”loader-container”>
<div class=”dot”></div>
<div class=”dot”></div>
<div class=”dot”></div>
</div>
<!– <div class=”main-content”>
This is the main page!
</div> –>
</body>
</html>