5

CSS only Blob loader

 2 years ago
source link: https://codepen.io/t_afif/pen/MWrXvMa
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CSS only Blob loader

0 unsaved changes
xxxxxxxxxx
<div class="loader"></div>
xxxxxxxxxx
.loader {
  width: 200px; /* control the size */
  aspect-ratio: 1;
  display: grid;
  background: linear-gradient(135deg,#00A8C6,#8FBE00);
  clip-path: inset(10%);
}
.loader:before {
  content: "";
  padding: 10%;
  --_g: no-repeat content-box radial-gradient(50% 50%,#000 95%,#0000);
  background: var(--_g),var(--_g),var(--_g),var(--_g),#fff;
  background-size: 20% 20%;
  filter: blur(5px) contrast(20);
  mix-blend-mode: lighten;
  animation: l 3s infinite,s 3s infinite;
}
@keyframes l {
  0%,
  100%{background-position:top   ,right ,bottom,left  }
  20% {background-position:center,right ,bottom,left  }

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK