Enable zoom in mobile website

后端 未结 3 826
清酒与你
清酒与你 2020-12-31 12:47

I\'m developing a mobile web site. But the zoom effect is not working on my pages. I\'ve used the following tag in the pages.



        
相关标签:
3条回答
  • 2020-12-31 12:57

    set also user-scalable to 1.

    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=10.0; user-scalable=1;" />
    
    0 讨论(0)
  • 2020-12-31 13:08

    When I just came across this post because I was experiencing the same issue, I realized that you can also simply remove the tag to make it scroll/zoom.

    0 讨论(0)
  • 2020-12-31 13:10

    This is because you've set the maximum-scale to the minimum amount (1.0) which means it won't be zoomable beyond what is rendered initially. You need to set the maximum-scale to something else between 1.0 and 10.0 in that meta tag. The default by Apple is to have the maximum-scale as 5.0 as per Apple's Documentation.

    Apple's Documentation on Meta Tags has a table on Viewport properties which list all the viewport meta tags which can be used

    0 讨论(0)
提交回复
热议问题