The problem
You need an eye-catching loading animation with smooth shape transformations.
The solution
.morph-loader {
width: 80px;
height: 80px;
border-radius: 50%;
background: linear-gradient(45deg, #3a7bff, #8b5cf6);
animation: morph 3s ease-in-out infinite;
}
@keyframes morph {
0%, 100% {
border-radius: 50%;
transform: rotate(0deg);
}
25% {
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
transform: rotate(90deg);
}
50% {
border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
transform: rotate(180deg);
}
75% {
border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
transform: rotate(270deg);
}
}
/* Pulsing variant */
.morph-pulse {
animation: morph 3s ease-in-out infinite, pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.1);
opacity: 0.8;
}
}
/* Multiple shapes */
.morph-group {
display: flex;
gap: 20px;
align-items: center;
}
.morph-group .morph-loader {
animation-delay: calc(var(--i) * 0.2s);
}See it live
Put it to work
<!-- Single morphing loader -->
<div class="morph-loader"></div>
<!-- Multiple synchronized loaders -->
<div class="morph-group">
<div class="morph-loader" style="--i: 0"></div>
<div class="morph-loader" style="--i: 1"></div>
<div class="morph-loader" style="--i: 2"></div>
</div>Worth knowing
Complex border-radius values create organic shapes. Combine with rotation for fluid motion.