主要是解決不同尺寸不同解析度造成顯示上的差異。
當你設定的頁面尺吋和devices不同,造成跑版的現像。
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
屬性說明
with=devices-width 指定viewport的寛度為devices的寛度
禁止使用者放大縮小
<meta name="viewport" content="user-scalable=0">
<meta name="viewport" content="user-scalable=no">
初始放大比例<meta name="viewport" content="width=device-width, initial-scale=1.0">
限制放大比例限制縮小比例<meta name="viewport" content="width=device-width, maximum-scale=15.0">
<meta name="viewport" content="width=device-width, minimum-scale=0.1">
Reference:http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html
http://webdesignerwall.com/tutorials/viewport-meta-tag-for-non-responsive-design
https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag
http://www.w3.org/TR/css-device-adapt/#the-viewport
沒有留言:
張貼留言