How to enable zooming on a mobile website?

I am trying to enable scaling on my site. I tried to enable scaling by setting meta viewport like this, but without any success.

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2.0, minimum-scale=1, user-scalable=yes"/> 

Any ideas why my site still doesn't scale on ipads and iphones?

+4
source share
2 answers

It may be a little late, seeing that it was answered almost a year ago ... Although I tried your meta tags on my HTML page of my iOS application. The tags really did not allow me to zoom out, and I could hardly zoom in, and when I zoom in, it will go back to its original size.

Now I’ve managed to completely zoom out and zoom in a lot, and it will keep scaling using these meta tags:

 <meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes"/> 
+15
source

You can try the new hammer.js , which can simulate a few touches. http://eightmedia.imtqy.com/hammer.js/

0
source

Source: https://habr.com/ru/post/1433852/


All Articles