Created
September 8, 2022 14:15
-
-
Save simbados/5addca4f4805454fe157310ee264de58 to your computer and use it in GitHub Desktop.
No zoom on mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to disable zoom on mobile use the following meta tag: | |
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"> | |
This will archieve the following: | |
- user can not zoom in or zoom out | |
- the page will always have a scale factor of 1 | |
- as an added "bonus" this will get rid of the browser bounce, when the user reaches the end of the page while scrolling. | |
Use this technique with caution, because the accessibility of your page will suffer drastically. | |
No zooming means that your page might not be visible on some devices and that users have difficulty with accessing your website. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment