日期标题

时间:2016-01-15 22:08:24

标签: css

我使用以下CSS在我的日期标题的两侧创建两行

.date-header span {
display: inline-block;
position: relative;  
}
.date-header span:after {
content: "";
position: absolute;
border-bottom: 1px solid #caa69a;
top: 6px;
width: 160%;
left: 110%;
}
.date-header span::before {
content: '';
position: absolute;
top: 6px;
border-top: 1px solid #caa69a;
width: 160%;
right: 110%;
}

然而,线条会根据日期的长度改变大小。我希望线条保持固定的长度。我不确定要编辑或添加的内容?

0 个答案:

没有答案
相关问题