相对于父元素,除最后一个class为item的元素添加伪类
.item {
position: relative;
}
.item:not(:last-child)::after {
content: " ";
position: absolute;
right: -16%;
top: 50%;
transform: translateY(-50%);
width: 1px;
height: 62rpx;
background: #ccc;
opacity: .6;
}
相对于父元素,除最后一个class为item的元素添加伪类
.item {
position: relative;
}
.item:not(:last-child)::after {
content: " ";
position: absolute;
right: -16%;
top: 50%;
transform: translateY(-50%);
width: 1px;
height: 62rpx;
background: #ccc;
opacity: .6;
}