在Opera浏览器中,“body * { cursor: auto; }”在“body { cursor: pointer; }”之后不会重置继承。

3
在Chromium和Firefox中,这个例子按预期工作。但是在Opera v.12.16中,橙色段落上的光标保持手形,就像在body上一样,为什么?我做错了什么吗?
CSS:
body {
   background-image: url( http://i.imgur.com/IH2QeSI.png );
   cursor: pointer;
}
body, html {
   width: 100%;
   height: 100%;
   margin: 0;
}
body * {
  cursor: auto;
}

p {
    width: 50%;
    height: 100%;
    margin:0 auto;
    background-color: orange;
}

HTML:

<body>
    <p></p>
</body>

更新:
在Firefox中,当我在段落中添加链接和文本时,会出现问题。就像这样:
<body>
    <p><a href='xxx'>xxx</a>xxx</p>
</body>

当鼠标悬停在链接上时,光标会显示为“选择”,在Firefox浏览器中可以看到。这是更新的代码片段

1
尽量避免在CSS中使用*,它会减慢页面加载速度。 - display-name-is-missing
3
你为什么使用这么老的Opera版本?全世界有多少人使用它? - j08691
同意@j08691的观点,即使是当前版本(17),其市场份额也不到整个市场的0.5%。 - display-name-is-missing
@j08691,我的听众仍在使用更旧版本的Opera :( - user3101054
@user3101054 嗯...好的,但是如果你使用 * 而不是 body *,它能工作吗? - display-name-is-missing
显示剩余4条评论
1个回答

0

Opera 不支持 cursor:auto,请使用 cursor:default 替代 :)


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接