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

How to disable page zoom in html

青灯夜游
Release: 2023-01-05 16:13:24
Original
21975 people have browsed it

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" />
Copy after login

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;"/>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template