css 渐变进度条

源码地址 (opens new window)

<div class='wrap'>
  <div class='child'>
  </div>
</div>
.wrap {
  width: 150px;
  height: 50px;
  border-radius: 15px;
  border: 2px solid #2e984c;
  background: #d8fad8;
  overflow: hidden;
}
.child {
  width: 150px;
  height: 50px;
  background: linear-gradient(to right, #3cc677, rgb(187 235 142 / 0.3));
  animation: atv 10s;
}
@keyframes atv {
  0% {
    width: 0px;
  }
  100% {
    width: 150px;
  }
}
lastUpdate: 2/24/2023, 5:32:22 PM