Home  >  Article  >  Web Front-end  >  How to disable page zoom in html

How to disable page zoom in html

青灯夜游
青灯夜游Original
2021-05-05 09:33:4421930browse

In HTML, you can use the meta tag to prohibit page scaling. You only need to set the value of the "maximum-scale" attribute in the meta tag to "1.0" and the value of the "user-scalable" attribute to "0" "That's it.

How to disable page zoom in html

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

HTML5 pages allow users to zoom in and out of the page by default, or double-click on the screen to zoom in or out.

The default setting is:

<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=yes" />

If you want to disable zooming, you can change it to the following setting:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to disable page zoom 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