您的位置:首页 > 其它

制作进度条的两种方法

2014-04-18 00:00 281 查看
摘要: 制作进度条的两种方法

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>制作进度条的两种方法</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style>
*{
margin:0;
padding:0;
}
body{font-size:12px;}h1{font-size:15px;}
.wrap{
font-size: 12px;
margin:40px auto;
width:400px;
}
/*进度条样式*/
.progressbar_1{
background-color:#eee;
height:16px;
width:150px;
border:1px solid #bbb;
color:#222;
}
.progressbar_1 .bar {
background-color:#6CAF00;
height:16px;
width:0;
}
</style>
</head>
<body>
<div class="wrap">
<h1>1,构建基本的HTML结构和CSS样式</h1>

0%的状态:
<div class="progressbar_1">
<div class="bar"></div>
</div>

50%的状态:
<div class="progressbar_1">
<div class="bar" style="width: 50%;"></div>
</div>

80%的状态:
<div class="progressbar_1">
<div class="bar" style="width: 80%;"></div>
</div>

100%的状态:
<div class="progressbar_1">
<div class="bar" style="width: 100%;"></div>
</div>

这步非常简单,相信大家都能看明白。
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: