我注意到有时在 map 周围单击时, map 图 block 会高亮显示,如图所示。有什么办法可以防止这种情况发生吗?
最佳答案
这意味着可以根据浏览器阻止选择:
CSS:
.unselectable {
-moz-user-select: none;
-khtml-user-select: none;
-o-user-select: none;
-webkit-user-select: none;
user-select: none;
}
JS:
$(".unselectable").bind("selectstart", function(e){
e.preventDefault();
});
关于javascript - 防止突出显示 map 图 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8608086/