前端 - 类似这种图例怎么实现效果比较好
问题描述
问题解答
回答1:可以用线性渐变.
<p class='linear'></p>
.linear{ width: 300px; height: 10px; border-radius: 5px; background-image: linear-gradient(to right, red 25%, blue 25%, blue 50%, green 50%, green 75%, gray 75%);}
https://jsfiddle.net/mmdgtj1e/
回答2:这是静态图吗?假设如果是,不需要来加动态效果,这个还是很好做的,最可耻的方法 扔给美工姐姐去,让她直接给你P出来个PNG直接用要是自己弄得换这个用行内元素拼接呗,然后设置边框
.common{ display:inline-block; width: 100px; float: left;}.clearfix{ *zoom: 1; }.clearfix:after { display: table; clear: both; content: ''; }.one{border-top:3px solid #ddd;}.two{border-top:3px solid #e34;}.three{border-top:3px solid #532;}.four{border-top:3px solid #244532;}.five{ border-top:3px solid #ccc;}----------<p class='clearfix'><span class=’one common’>1</span><span class=’two common’>10</span><span class=’three common’>100</span><span class=’four common’>1000</span><span class=’five common’>10000</span></p>
相关文章:
1. 老师们php,插入数据库mysql,都是空的,要怎么解决2. 登录密码 什么情况???3. mysql 启动不了4. angular.js - 在网页中加载优酷开放云中的视频,在angularJS中就是失败,在普通的html页面中能正常加载5. javascript - 微信小程序不支持<br> <p>等标签6. 登录不了????7. html5 - npm install vuex -s 时报错8. javascript - react 组件 使用super()报错9. find_in_set - 请教 mysql查询10. mysql - owncloud 数据库错误 1045,太奇怪了。

网公网安备