gpt4 book ai didi

javascript - 禁用 Chrome for Android 文本选择弹出窗口

转载 作者:可可西里 更新时间:2023-11-01 05:43:05 26 4
gpt4 key购买 nike

我想隐藏用户选择任何文本时显示的 Chrome for Android 文本选择弹出窗口,这样默认的文本选项弹出窗口(附上的屏幕截图)就不会出现。

有没有办法使用 javascript 来做到这一点,而不从整体上删除文本选择功能?

enter image description here

最佳答案

你可以像这样使用css,试试吧:)

user-select: none;

.disable-selection{
-moz-user-select:none;
-ms-user-select:none;
-webkit-user-select:none;
}
<p class="disable-selection">can't select this</p>

<p>can select this</p>

关于javascript - 禁用 Chrome for Android 文本选择弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42336911/

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