网站首页 > 知识剖析 正文
效果图:
html:
<!--进度条-->
<div class="progress-wrap">
<div class="progress-inner">
<div class="progress-nums"></div>
</div>
<span>60%</span>
</div>
css:
/*进度条*/
.progress-wrap {
width: 100%;
height: 12px;
border-radius: 8px;
position: relative;
}
.progress-wrap span{
position:absolute;
left:50%;
top:-20px;
color:#000;
}
/*进度条底层背景样式*/
.progress-inner {
height: inherit;
background: rgb(142 193 255 / 20%);
border-radius: 8px;
}
/*进度层样式效果,使用动画效果*/
.progress-nums {
width: 60%;
height: inherit;
border-radius: 6px;
background: repeating-linear-gradient(-45deg, #008bdd 25%, #49beff 0, #49beff 50%, #008bdd 0, #008bdd 75%, #49beff 0);
background-size: 16px 16px;
animation: panoramic 30s linear infinite;
}
/*定义动画*/
@keyframes panoramic{
to {
background-position: 200% 0;
}
}
猜你喜欢
- 2025-10-02 初识CSS——定位实用小案例_css定位的作用
- 2025-10-02 还用 JavaScript 实现返回顶部?纯 CSS 轻松搞定!
- 2025-10-02 Web性能优化_web优化方法
- 2025-10-02 一个有趣的图片加载效果_有趣图片加文字
- 最近发表
- 标签列表
-
- xml (46)
- css animation (57)
- array_slice (60)
- htmlspecialchars (54)
- position: absolute (54)
- datediff函数 (47)
- array_pop (49)
- jsmap (52)
- toggleclass (43)
- console.time (63)
- .sql (41)
- ahref (40)
- js json.parse (59)
- html复选框 (60)
- css 透明 (44)
- css 颜色 (47)
- php replace (41)
- css nth-child (48)
- min-height (40)
- xml schema (44)
- css 最后一个元素 (46)
- location.origin (44)
- table border (49)
- html tr (40)
- video controls (49)