效果:
附代码:
<view class="content-title">了解详情</view>
.content-title {
font-size: 36rpx;
font-weight: 600;
color: #3A3D44;
height: 45px;
line-height: 45px;
position: relative;
text-align: center;
}
.content-title:before {
content: "";
position: absolute;
width: 28rpx;
height: 2rpx;
top: 50%;
background-color: #212121;
left: 32%;
}
.content-title:after {
content: "";
position: absolute;
width: 28rpx;
height: 2rpx;
top: 50%;
background-color: #212121;
right: 32%;
}