gpt4 book ai didi

javascript - 如何在 Opera 移动浏览器中禁用高亮选择

转载 作者:行者123 更新时间:2023-11-28 10:14:21 26 4
gpt4 key购买 nike

当我通过 Opera 移动浏览器 (12.10.ADR-1309251116) 按下页面的按钮时,会出现突出显示的选择。因为高亮选择在我的人物离开屏幕后延迟了大约 0.5 秒,所以我想禁用它,但失败了。这是我的代码片段:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
</head>

<body>

<style type="text/css">
* {
margin: 0;
padding: 0;
list-style-type: none;
}

.btn{
width: 100px;
height: 50px;
margin: 20 auto;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drga: none;
-webkit-touch-callout: none;
}
</style>
<body>
<button class="btn unselectable" unselectable="on" >click me</button>
</body>
</html>

enter image description here

有什么建议吗?

最佳答案

Opera Classic 上使用 user-select: none 阻止文本/元素选择是不可能的,参见 Here .

关于javascript - 如何在 Opera 移动浏览器中禁用高亮选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24263723/

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