商品列表标题
左右横线中间文字
效果图片预览
代码如下:
html:
<div class="track-tit">
<h3>中间文字</h3>
<span></span>
</div>
css:
.track .track-tit {
position: relative;
line-height: 50px;
font-size: 12px;
color: #e24242;
font-weight: 400;
text-align: center;
}
.track .track-tit h3 {
position: relative;
z-index: 2;
display: inline;
zoom: 1;
background: #fff;
padding: 0 25px;
}
.track .track-tit span {
position: absolute;
z-index: 1;
left: 0;
right: 0;
top: 25px;
height: 1px;
background: #f2f2f2;//重点,颜色换成你的背景色
}