我希望在鼠标移动到框子上的时候让文字不被框子压住,于是想到了设置z-index
> mc
position: absolute
border: 2px solid #FF1515
&::before
content: attr(tips)
display: block
position: absolute
top: -16px
left: -2px
width: 25px
background-color: #4a90e2
font-size: 12px
color: white
&:hover::before
z-index: 100
写完了才发现伪类元素设置z-index不起作用,请问这块该怎么解决啊
仔细对比下面两个图,是有效果的 。测试地址:http://jsrun.net/sp9Kp/edit

