这种阶段性的进度条怎么做。

https://img1.mukewang.com/5bdab1bd0001bd8509970120.jpg

请问这种类似的效果图怎么做,或者有没有类似的demo链接发一下

四季花海
浏览 864回答 1
1回答

杨魅力

有两套图片(绿色的圆形图和灰色的圆形图,是不是灰色的我不清楚,反正就是默认的那种图),有两个颜色的进度线条,(灰色和绿色的),然后和楼上的思路是一样的,就是图片的两种class名称的切换,和两种class名称的线条的长度改变,比如(我只写线条的,懒得去找图片,反正方式是一样一样的):.line{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; position: relative;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .default{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; position: absolute;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin: 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 100%;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-bottom: 2px solid #999;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-top: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-left: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-right: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .runing{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; position: absolute;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin: 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 80%;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-bottom: 2px solid #e4393c;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-top: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-left: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-right: none;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <div class="line">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <hr class="default"/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <hr class="runing"/>&nbsp; &nbsp; &nbsp; &nbsp; </div>你要做的就是用js配合,动态修改runing的宽度就Ok了,那个图片其实也差不多的,根据runing的长度,来切换图片(你甚至可以把一切都写死,前提是该效果有多个页面,并且都是静态的页面)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript