您的位置:首页 > Web前端 > CSS

css实现百分比进度条

2016-07-25 10:33 656 查看
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试</title>
<style type="text/css">
.Bar { position: relative; width: 200px;
/* 宽度 */ border: 1px solid #B1D632; padding: 1px; }
.Bar div{ display: block; position: relative;
background:peachpuff;/* 进度条背景颜色 */ color: #333333;
height: 20px; /* 高度 */ line-height: 20px;
/* 必须和高度一致,文本才能垂直居中 */ }
.Bar div span{ position: absolute; width: 200px;
/* 宽度 */ text-align: center; font-weight: bold; }

</style>
</head>
<body>
百分比进度条样式:
<div class="Bar">
<div style="width:70%;">
<span>70%</span>
</div>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: