Home > Web Front-end > Front-end Q&A > How to disable zooming in css

How to disable zooming in css

藏色散人
Release: 2023-01-04 09:35:41
Original
7385 people have browsed it

How to disable scaling in css: First open the corresponding front-end code file; then add the two attributes "maximum-scale=1.0, user-scalable=0" to the meta tag to disable page scaling.

How to disable zooming in css

The operating environment of this article: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

How to set css to not allow page scaling?

How to set css to not allow page scaling? Disable page zoom?

Actually, just add the following two attributes to the meta tag:

maximum-scale=1.0, user-scalable=0
Copy after login

Among them, maximum-scale: the maximum zoom value allowed by the user; user-scalable: whether the user is allowed to zoom , the default attribute is yes or 1 to allow, and it needs to be set to no or 0 if it is not allowed;

Finally, the actual settings are as follows:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
Copy after login

There are mainly these attributes in this:

width - the width of the viewport

height - the height of the viewport

initial-scale - the initial scaling ratio

minimum-scale - what the user is allowed to zoom to Minimum scale

maximum-scale - The maximum scale the user is allowed to zoom to

user-scalable - Whether the user can manually zoom

How to disable zooming in css

【 Recommended learning: css video tutorial

The above is the detailed content of How to disable zooming in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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