shrink-to-fit(自适应宽度)


下面一行代码可以让网页的宽度自动适应手机屏幕的宽度

<meta name="viewport" content="width=device-width,initial-scale=1">

但在IOS9中要想起作用,得加上"shrink-to-fit=no",原因如下:

Viewport meta tags using"width=device-width" cause the page to scale down to fit content that overflows the viewport bounds. 
You can override this behavior by adding "shrink-to-fit=no" to your meta tag as shown below. 
The added value will prevent the page from scaling to fit the viewport.

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM