Prevent iPhone from zooming in web-app with HTML

HTMLWeb DevelopmentFront End Technology

Giving a meta tag attribute "user-scalable=no" will restrict the user from zooming elsewhere.  

Prevent zooming all together by adding this meta tag to your head tag. This tells the mobile browser to use the same width scale and will not allow the user to zoom in at all, hence also disables that annoying behavior. However, some might argue that this is not a very user-friendly way to handle the problem.

<meta name = "viewport" content = "width=device-width, minimum-scale=1.0, maximum-scale = 1.0, user-scalable = no">

The <select> element, used along with one or more <option> elements, creates a drop-down list of options for a web form. The <select> element creates the list and each <option> element is displayed as an available option in the list.

By setting the font-size of the input field to a font-size of 16px (or larger), we prevent the browser from zooming in on focus. Note that we use the device aspect ratio to set the font size of 16px only for devices which have the specified device-aspect-ratio.

select{
   font-size: 40px;
}
raja
Published on 21-Mar-2018 09:52:08
Advertisements