【发布时间】:2018-02-08 09:52:54
【问题描述】:
li:before {
content: "";
width: 2px;
height: 27px;
background-color: white;
float: left;
margin-top: 14px;
}
这条线出现在菜单的左侧,但我也需要在联系人的右侧也有一条线。我尝试了下面的代码,但没有成功。
li:last-child:after {
content: "";
width: 2px;
height: 27px;
background-color: white;
float: right;
margin-top: 14px;
}
【问题讨论】:
-
什么不起作用?发生了什么?
-
show html .. 顺便说一句,像这样使用浮点数不是个好主意
标签: html css pseudo-element