【发布时间】:2017-07-06 05:16:25
【问题描述】:
我有一个带有cursor: pointer; 的元素,并希望它的:after 伪元素有cursor: default;(普通鼠标箭头)。
.one {
display: inline-block;
padding: 0;
margin: 4px;
color: #FFF;
font-size: 14px;
background: red;
}
.two {
cursor: pointer;
}
.two:after {
content: "\2027";
padding: 0 5px;
background: aqua;
color: #000;
cursor: default;
}
<div class="one">
<div class="two">
Text
</div>
</div>
但无论我在:after 伪元素中将cursor 设置为什么,它总是显示pointer。
Here 是个难题
我能找到的所有 SO 帖子都没有提供该问题的解决方案。
编辑#1
根据评论,这可能是 Safari 独有的问题。在 Chrome 中测试,一切正常。
【问题讨论】:
-
为我显示默认光标
-
@John 我刚刚在 Chrome 中进行了测试,它工作正常。似乎是 Safari 的问题。