美文网首页
CSS 加载进度条

CSS 加载进度条

作者: 梦安web开发 | 来源:发表于2024-05-13 09:40 被阅读0次
  • html代码
<div class="load_tab">
    <span></span>
</div>
  • css样式
.load_tab {
    position: absolute;
    width: 353px;
    height: 29px;
    left: 0;
    right: 0;
    top: -20px;
    bottom: 0;
    margin: auto;
    border: 2px solid #ffb000;
    border-radius: 20px;
    background-color: #fff;
    overflow: hidden;
}

span {
    display: block;
    position: relative;
    height: 28px;
    background-image: linear-gradient(180deg, #b7335f 0%,#f77f79 100%);
}

span::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 100px;
    background-size: 20px 20px;
    background-image: -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, rgb(255, 255, 255)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgb(255, 255, 255)), color-stop(.75, rgb(255, 255, 255)), color-stop(.75, transparent), to(transparent));
}
效果图

相关文章

网友评论

      本文标题:CSS 加载进度条

      本文链接:https://www.haomeiwen.com/subject/ouonoktx.html