css pseudo class: remove the last pseudo element

Relative to the parent element, add a pseudo-class to the element except the last class for 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;
}

Guess you like

Origin blog.csdn.net/Joye_7y/article/details/128874293