扫码关注官方订阅号
比如win10平板,打开的chrome浏览器是桌面版的,因为屏幕小,显示移动端的页面,但是用user-scalable=no只对移动端浏览器浏览器有效,桌面版chrome无效。
请问各位兄台,还有没有办法禁用桌面版chrome在触屏设备上的缩放事件?
学习是最好的投资!
自己曲线救国解决。监听touchstart touchmove touchend事件,判断事件对象的touches,如果触点>=2,就e.preventDefault(),即可禁用pinch和pinch-out动作的缩放。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
自己曲线救国解决。监听touchstart touchmove touchend事件,判断事件对象的touches,如果触点>=2,就e.preventDefault(),即可禁用pinch和pinch-out动作的缩放。