" can be used to prohibit zooming in."/> " can be used to prohibit zooming in.">
Home >Web Front-end >Front-end Q&A >How to disable page enlargement in html5
In html5, you can pass "ab5a2eaef0e445d1c7fc3cc23fd7c5ee" Zooming in is prohibited.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
html5 prohibits mobile phone zooming (zooming in and out)
html5 page, and found that by default, users are allowed to zoom the page, or double-click on the screen to zoom in or out. That is equivalent to setting like this
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=yes" />
If you want to disable zooming, just modify the corresponding parameters of the meta tag in the HTML:
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
The function of this meta tag is to make the width of the current viewport equal to the width of the device , while not allowing users to manually zoom.
maximum-scale is the maximum zoom value allowed for the user, user-scalable is whether the user is allowed to zoom, yes (default) means allowed, no (0) means not allowed, the combination of the two can block the page Being amplified (after testing, none of the missing items can achieve the effect)
Recommended tutorial: "html video tutorial"
The above is the detailed content of How to disable page enlargement in html5. For more information, please follow other related articles on the PHP Chinese website!