纯CSS柱状图,无动画
来源:互联网 发布:点名软件 编辑:程序博客网 时间:2024/05/17 09:29
<html><head> <meta charset="UTF-8"> <title</title> <link rel="stylesheet" href="style.css" media="screen" type="text/css"></head><body><section class="data"> <div class="bar-wrap"> <label>Data 1</label> <div class="bar green" data-percentage="21" style="width: 21%;"></div> </div> <div class="bar-wrap"> <label>Data 2</label> <div class="bar red" data-percentage="78.95" style="width: 78.95%;"></div> </div> <div class="bar-wrap"> <label>Data 3</label> <div class="bar blue" data-percentage="94.7" style="width: 94.7%;"></div> </div> </section></body></html>
style.css代码:
*, *:before, *:after { box-sizing: border-box;}body { font-family: 'Source Sans Pro', sans-serif; font-weight: 300; font-size: 14px; padding: 30px; background: #eaeaea;}section.data { position: relative; overflow: hidden;}div.bar-wrap { width: 100%; display: block; margin: 0 0 20px 0; overflow: hidden;}div.bar-wrap label { font-size: 0.8em; color: #8a8a8a; text-transform: uppercase; margin: 0 0 2px 0; display: block;}div.bar-wrap div.bar { height: 40px; width: 0; position: relative;}div.bar-wrap div.bar:after { content: attr(data-percentage) "%"; display: block; position: absolute; top: 0; right: 0; height: 40px; padding: 10px;}div.bar-wrap div.bar.blue { background-color: #61a7c4; border-bottom: 3px solid #4290b0;}div.bar-wrap div.bar.blue:after { color: #FFF;}div.bar-wrap div.bar.green { background-color: #61c471; border-bottom: 3px solid #42b054;}div.bar-wrap div.bar.green:after { color: #FFF;}div.bar-wrap div.bar.red { background-color: #c46161; border-bottom: 3px solid #b04242;}div.bar-wrap div.bar.red:after { color: #FFF;}div.bar-wrap div.bar.purple { background-color: #a461c4; border-bottom: 3px solid #8d42b0;}div.bar-wrap div.bar.purple:after { color: #FFF;}
0 0
- 纯CSS柱状图,无动画
- 进度条动画(纯css)
- 纯CSS实现倒计时动画
- 纯CSS实现倒计时动画
- 纯css实现回旋动画
- 纯CSS实现小车动画
- 无图片纯css实现圆角框
- 无图片纯css实现中国象棋棋子
- [纯css]win8环形等待动画
- 纯css实现苹果表盘动画
- 纯CSS创建心形翻转动画
- 纯css实现 页面加载动画
- 纯css实现波浪动画,超级简单
- 纯CSS预加载动画效果
- 纯CSS写的加载动画--圆球搜索加载动画
- 纯 CSS 方式实现 CSS 动画的暂停与播放
- 无javascript,纯CSS制作的网页下拉菜单
- 纯CSS无图实现DIV边框平滑阴影
- uva 12307 - Smallest Enclosing Rectangle(旋转卡壳)
- Unity全景项目经验Q&A
- Multiset(中)——STL中的multiset
- html5 canvas 详细使用教程
- 使用Octopress搭建静态博客网站
- 纯CSS柱状图,无动画
- Linux Ubuntu server使用Xmanager工具完成Tomcat war包部署
- uva 11072 - Points(凸包)
- JSON example with RESTEasy + Jackson
- Python 2.7 (64 bit )下安装 OpenCV 3.0
- Linux高级(策略)路由使用方法
- 几种常见模式识别算法整理和总结
- Apache+tomcat集群
- uva 11265 - The Sultan's Problem(多边形切割)