By: Gren in HTML5 Tutorials on 2023年04月03日 [フレーム]
user-scalable=no is a value for the user-scalable attribute in the viewport meta tag in HTML. This attribute controls whether or not a user is allowed to zoom in and out of a web page using pinch-to-zoom or other similar gestures on mobile devices.
Setting user-scalable=no disables the ability for the user to zoom in and out of the web page. This can be useful in certain situations, such as when the layout of the web page is designed to be responsive to different screen sizes, or when the content of the web page is already optimized for a specific display size.
However, it is important to note that disabling user zoom can also limit accessibility for users who may have visual impairments or other accessibility needs. For this reason, it is generally recommended to allow users to zoom in and out of a web page, unless there is a specific design or content reason for disabling it.
Here is an example of how the viewport meta tag with user-scalable=no would look in HTML:
<meta name="viewport" content=" width=device-width, initial-scale=1.0, user-scalable=no">
This sets the width of the viewport to the width of the device, sets the initial scale to 1.0 (which sets the default zoom level to 100%), and disables user scaling.
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in HTML5 )
user-scalable=no in the meta tag in html
HTML5 Canvas - Using Canvas in HTML5
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Video - Handling video in HTML5
Latest Articles (in HTML5)
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate