css实现间隔线
用css实现下图间隔线效果
以下是代码
ul {
li {
&::after {
display: inline-block;
content: "";
width: 2px;
height: 26px;
background: #eeeeee;
position: absolute;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
&:last-child {
&::after {
display: none;
}
}
}
}
当然,如果不是用ul li的可以根据自己使用的标签去替换,主要是&::after的内容进行实现
给自己做的记录,希望对读者有帮助