在html中:
<div class="box">
<div class="line"></div>
<h5>分割线</h5>
</div>
样式:
.box {
position: relative;
}
.box .line {
position: absolute;
height: 1px;
background-color: #ddd;
z-index: -1;
top: 10px;
left: 0px;
width: 100%;
}
.box h5 {
text-align: center;
width: 100px;
margin: 0 auto;
background-color: #eee;
display: block;
color: #999;
}