[英]How to disable highlight selection in Opera mobile browser
当我通过Opera mobile浏览器(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>
有什么建议吗?
使用user-select: none
来阻止文本/元素选择是不可能的user-select: none
Opera Classic上user-select: none
,请参见此处 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.