border-radius 八个值,捏出有机形状。
<div class="blob"></div>.blob {
width: 120px; height: 110px;
background: linear-gradient(140deg, #2b57ff, #b06bff);
border-radius: 62% 38% 46% 54% / 55% 45% 55% 45%;
animation: morph 6s ease-in-out infinite alternate;
}
@keyframes morph {
to { border-radius: 38% 62% 63% 37% / 41% 58% 42% 59%; }
}复制后可直接使用;如果要放进已有项目,注意把类名改成你项目里的命名,避免冲突。