【问题标题】:The text selection in Firefox is still working after disabling it from CSS从 CSS 禁用后,Firefox 中的文本选择仍然有效
【发布时间】:2013-08-07 18:27:36
【问题描述】:

我正在使用 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 有什么不同?如何禁用那里的选择?

【问题讨论】:

    标签: css firefox selection


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      还发现-moz-none 代替moz-none 也可以。但是,是的,none 更好。

      【讨论】:

        猜你喜欢
        • 2012-10-19
        • 1970-01-01
        • 2014-04-09
        • 2012-07-12
        • 1970-01-01
        • 1970-01-01
        • 2020-09-09
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多