vue h5移动端禁止缩放
在index.html里面写
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
ios中还要添加:
<script>
window.onload = function() {
document.addEventListener('touchstart', function(event) {
if (event.touches.length > 1) {
event.preventDefault()
}
})
document.addEventListener('gesturestart', function(event) {
event.preventDefault()
})
}
</script>
以上是 vue h5移动端禁止缩放 的全部内容, 来源链接: utcz.com/z/377953.html