例子:对象
.feature-list .item:not(:last-child):after {
content: "";
position: absolute; /* 绝对定位是哪一个li的,li哪里用相对定位*/
right: 0;
top: 10px;
width: 1px;
height: 100px;
background: #ff6d01;
}blog
注释:it
1.selector:after( sRules ) 它要和content属性一块儿使用,设置在对象前(依据对象树的逻辑结构)发生的内容;io
2.:not(:last-child) 去除全部与给定选择器匹配的元素,就算去除最后一个匹配的选择器元素。ast
3.content表明插入内容。content为空时,插入的内容默认是一个行内元素select