Meta viewport tag seems to be ignored completely or has no effect

后端 未结 7 1724
不思量自难忘°
不思量自难忘° 2021-02-07 19:09

I have put this tag in the head of a webpage:

For s

7条回答
  •  名媛妹妹
    2021-02-07 19:47

    Viewport width is different in may devices. iOS has 320, android has 360 in portrait mode. Landscape mode - it depends on which device you have, you will get different different width.

    Best way to make website optimized for mobile is set width=device-width. If you don't set initial-scale=1.0 - iOs will zoom in (enlarge) screen when changing device rotation.

    This meta is all you needed.

    
    

    And if you wanted to disable the zoom feature, set user-scalable=no

    
    

    Do not hard code width property as it will set same width for portrait and landscape modes - which is very unpleasing user experience.

    Best documented: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

    About iOs 7 Moreover I would say - dont worry about iOS7 as of now. It has so many bugs. Read here: http://www.sencha.com/blog/the-html5-scorecard-the-good-the-bad-and-the-ugly-in-ios7/

提交回复
热议问题