Home  >  Article  >  Web Front-end  >  How to prohibit page zooming in html

How to prohibit page zooming in html

青灯夜游
青灯夜游Original
2021-05-14 15:46:2315550browse

In HTML, you can use the meta tag and set the value of the content attribute to "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" to prohibit page enlargement Zoom out.

How to prohibit page zooming in html

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

html page prohibits zooming in and out

<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, and does not allow the user 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 prohibit page zooming in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn