1) ⚫ Bouncing Dots Loader
It shows three dots that bounce with staggered animation delays. Its great for minimalistic designs.
<style>
.bouncing-loader {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
.bouncing-loader > div {
width: 12px;
height: 12px;
background: #000;
border-radius: 50%;
animation: bounce 0.6s infinite alternate;
}
.bouncing-loader > div:nth-child(2) {
animation-delay: 0.2s;
}
.bouncing-loader > div:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
to {
transform: translateY(-15px);
opacity: 0.7;
}
}
</style>
<body>
<div class="bouncing-loader">
<div></div>
<div></div>
<div></div>
</div>
</body>@keyframes bounce defines the animation steps. It only specifies the to state, meaning it animates from the default (no transform) to translateY(-15px) and opacity: 0.7.
animation property
bounce: refers to the keyframe name.
0.6s: duration of each bounce.
infinite: it loops forever.
alternate: reverses direction each cycle (up then down).
Staggered delays (animation-delay) on each dot create a wave-like bounce.
2) 💡 Fancy Glowing Spinner
Its a circular spinner with a glowing blue effect. It uses box-shadow and a rotating animation.
<style>
.glow-spinner {
width: 40px;
height: 40px;
border: 4px solid transparent;
border-top: 4px solid #00f;
border-radius: 50%;
animation: glowSpin 1s linear infinite;
box-shadow: 0 0 10px #00f;
}
@keyframes glowSpin {
to {
transform: rotate(360deg);
}
}
</style>
<body>
<div class="glow-spinner"></div>
</body>@keyframes glowSpin rotates the spinner from its default position to 360 degrees.
animation property
glowSpin: keyframe name.
1s: one full rotation per second.
linear: constant speed.
infinite: loops endlessly.
The box-shadow adds a glowing effect, and the border-top color creates the visual cue for rotation.
3) ◼️ Custom Shape: Twisting Square Loader
A square that rotates and scales for a dynamic twist effect. It uses a unique shape compared to typical circular spinners.
<style>
.square-spinner {
width: 30px;
height: 30px;
background: #000;
animation: twist 1.2s ease-in-out infinite;
}
@keyframes twist {
0% { transform: rotate(0deg) scale(1); }
50% { transform: rotate(180deg) scale(1.2); }
100% { transform: rotate(360deg) scale(1); }
}
</style>
<body>
<div class="square-spinner"></div>
</body>@keyframes twist defines three stages:
Start at 0° rotation and normal size.
Midway at 180° and scaled up.
End at 360° and back to original size.
animation property
twist: keyframe name.
1.2s: duration of one full twist.
ease-in-out: smooth acceleration and deceleration.
infinite: keeps looping.
