• 主页
  • 个人简介
    • 圣墨 photo

      圣墨

      一个爱折腾,有诗有远方的人

    • Learn More
    • Github
    • Cnblogs
    • Weibo
  • 文章
    • 所有文章
    • 所有标签
  • Html&Css
  • Javascript
  • 设计模式
  • 前端性能优化
  • 原生实现专题
  • 数据结构与算法
  • Book
  • 面试题
  • 前端工具
  • 随记

H5C3实现进度条缓冲效果

11 Jul 2019

Reading time ~1 minute

H5C3实现进度条缓冲效果

<div class="out">
  <div class="inner">
    <div class="progress"></div>
  </div>
</div>
.out {
    width: 300px;
    padding: 8px;
    background: rgba(15, 27, 71, 1);
    border: 2px solid rgba(20, 125, 229, 0.42);
    border-radius: 10px;
}
.inner {
    width: 100%;
    height: 27px;
    background: rgba(23, 50, 110, 1);
    border: 2px solid rgba(20, 125, 229, 0.42);
    border-radius: 10px;         
}
.progress {
    height: 100%;
    border-radius: 10px;
    width: 70%;
    background: -webkit-linear-gradient(
    left,
    #66ffff 10%,
    #ba6409 100%
    );
    background-size: 200% 100%;
    animation: progressMove 3s linear infinite;
}
@keyframes progressMove {
    0% {
    background-position: 0 0;
    }
    100% {
    background-position: -100% 0;
    }
}


Html css  微博  QQ  朋友圈