当前位置:首页 > 操作系统 > Ios

javascript – 禁用iOS Safari中的选择上下文菜单

我想禁用在iOS Safari(Web浏览器)中选择某个文本后出现的默认上下文菜单.那可能吗?

解决方法:

有可能,见this example.基本上,重要的是设置正确的css属性:

body { -webkit-touch-callout: none !important; }
a { -webkit-user-select: none !important; }

此外,这是一个解决类似问题的question


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!