用DIV模拟HR,推荐下面这种
<div style="border-bottom:1px solide #cccwidth:1000pxmargin:0 autoheight:1px!important"></div>
<!DOCTYPE HTML><html>
<meta charset="UTF-8" />
<head>
<title></title>
</head>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<style type="text/css">
*{
margin: 0
padding: 0
}
.box {width: 100%border: 1px solid #000000box-sizing: border-boxposition: relative}
.img1{height: 100%width: 100%}
li{list-style: none}
.box li{border-bottom: 1px dashed #000000width: 80%background: #DCDCDCheight: 35px}/*dashed是虚线width控制li的宽度*/
.text{position: absolutetop:42.5pxleft:30%}
.text20{position: absolutetop:42.5pxright:20px}
</style>
<body>
<div class="demo">
<div class="box" style="">
<ul>
<li>内容1</li>
<li>内容2</li>
<li>内容3</li>
</ul>
<div class="text">
灰色内容占总宽度80%
</div>
<div class="text20">
白色内容占</br>总宽度20%
</div>
</div>
</div>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)