小工具知识网

当前位置: 首页 > 行业知识 > 纯css进度条,简单美观实用。

行业知识

纯css进度条,简单美观实用。

2026-11-26 21:46:17 来源:互联网转载

css

    .card-progress-bar{        width: 80%;    }    .bar{        height: 20px;        width: 90%;        background-color: #D7E4EF;    }    .bar::before{        display: block;        counter-reset: progress var(--precent);        content: counter(progress) '%';        width: calc(1% * var(--precent));        color: #D7E4EF;        background-color: #4193F7;        text-align: center;        white-space: nowrap;        overflow: hidden;    }

html:在style���给 “–precent”赋值,就能显示对应百分比。

                       

上一篇:如何测试服务器大小?

下一篇:腾讯云服务器推介会