motionsites中文站 / 加载动画 · Short Swan
加载动画 · Short Swan
aadmin2026-09-19 发布组件0 阅读

加载动画 · Short Swan

类型:组件 · 分类:加载动画 · 收录:2026-09-19 · 源码:会员可见

[hidecontent type="vip1"]
<div class="loader"></div>

<style>
/* From Uiverse.io by Yaya12085 - Tags: loading, progress bar, loader, colorful */
.loader {
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 60px;
  height: 22px;
  border: 2px solid;
  border-radius: 3px;
  margin-left: -3px
}

.loader::after,
.loader::before {
  content: "";
  display: block;
  box-sizing: border-box;
  position: absolute;
  height: 12px;
  background: currentColor;
  top: 3px
}

.loader::before {
  right: -4px;
  border-radius: 3px;
  width: 4px
}

.loader::after {
  width: 1px;
  left: 3px;
  animation: full 2s ease-in-out infinite;
}

@keyframes full {
  20% {
    background-color: red
  }

  45% {
    background-color: yellow;
  }

  to {
    width: 50px;
    background-color: greenyellow;
  }
}
</style>
[/hidecontent]
← 返回首页