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.
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
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">
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
【 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!