加垂直分割线有很多方法:
例如:
1、最坏的实现就是直接加一个 “|”线,尽量不要这样做
2、可以用border来实现。例如:
margin-right: 15px;
padding-right: 15px;
border-right: 1px solid #d9d9d9;
3、用伪类实现:
.fix-text {
&:after {
content: "";
margin-left: 15px;
padding-left: 15px;
border-left: 1px solid #c0c4cc;
height: 12px;
display: inline-block;
vertical-align: middle;
}
}
另一种写法,用定位
.fix-text {
&:before {
content: "";
width: 1px;
height: 50%;
position: absolute;
top: 25%;
left: 0;
background: #dcdfe6;
}
}
还有很多种方式,暂时只列举三种,我最常用的是用伪类实现,可以定义高度,border只能用框的高度