我有这个简单的css代码:
li:not(:first-child):before{
content:"\2666";
position: relative;
left: -15px;
color:white;
opacity: 0.3;
transition: all 0.2s ease-in;
}
我希望在悬停时将underline
添加到除:before
(伪元素)之外的元素。
像这样简单
li:not(*What to add here?*):hover{
text-decoration: underline;
}