gpt4 book ai didi

css - 从 CSS 禁用后,Firefox 中的文本选择仍然有效

转载 作者:太空宇宙 更新时间:2023-11-04 04:26:57 26 4
gpt4 key购买 nike

我正在使用 CSS 规则:

.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: moz-none;
-ms-user-select: none;
user-select: none;
}

这会在 Chrome 中禁用如下所示的 div 选择,但在 Firefox 中则不会:

<div class="noselect">
<span>This text cannot be selected</span>
</div>

我有最新的浏览器版本。样本可以在这个 jsFiddle 中找到.

Firefox 有什么不同?如何禁用那里的选择?

最佳答案

对于 firefox:只使用“none”而不是“moz-none”

关于css - 从 CSS 禁用后,Firefox 中的文本选择仍然有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18099914/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com