伪类注入的内容将是有关联的目标元素的子元素,但它会被置于这个元素的任何内容的“前(::before)”或“后(::after)”。(注:伪元素如果没有设置“content”属性,伪元素是无用的)
.如:
.group-icon-end {
width: 2px;
height: 10px;
background: #c60909;
display: inline-block;
position: relative;
}
是这样
_____________________________________________________________________________
.group-icon-end::after {
width: 5px;
background: #c60909;
content: ' ';
display: inline-block;
height: 2px;
position: absolute;
bottom: 0;
}
加入伪类之后