扫码关注官方订阅号
也尝试 -webkit-touch-callout:none;和 pointer-events: none;但是对安卓是好像是没有效果.有以前解决的吗?
-webkit-touch-callout:none;
pointer-events: none;
认证高级PHP讲师
监听触摸事件,禁止触发默认行为
window.ontouchstart = function(e) { if (e.target.tagName === 'img') e.preventDefault(); };
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
监听触摸事件,禁止触发默认行为