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