Chrome会忽略"user-scalable = no",元标记 [英] Chrome ignores "user-scalable=no" meta tag
问题描述
为什么 desktop-chrome 对此忽略:
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
我可以使用 windows-touch 和 ctrl +鼠标滚轮来调整Chrome内容的大小.我想防止缩放.
I can resize chrome content with windows-touch and also ctrl+mouse-wheel. I want to prevent zooming.
Chrome浏览器: 65.0.3325.146版(正式版本)(32位)
Chrome: Version 65.0.3325.146 (Official Build) (32-bit)
推荐答案
According to the Google Map documentation,
Android和iOS设备遵守以下
< meta>
标签:
<元名称=视口"内容=初始比例= 1.0,用户可比例=否"./>
此设置指定地图应全屏显示,并且用户不可调整大小.请注意,iPhone的Safari浏览器要求将此标记包含在页面的元素中.
This setting specifies that the map should be displayed full-screen and should not be resizable by the user. Note that the iPhone's Safari browser requires this tag be included within the page's element.
台式机不支持 user-scalable
属性,尽管移动设备可以.
Desktop computers do not respect the user-scalable
attribute, though mobiles will.
如果要防止在台式机计算机上放大Chrome,最好的选择是使用以下启动参数启用信息亭模式:
If you want to prevent zoom in Chrome on desktop computers, your best bet would be to enable kiosk mode with the following startup arguments:
chrome.exe --kiosk --incognito --disable-pinch --overscroll-history-navigation=0
这篇关于Chrome会忽略"user-scalable = no",元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!