shrink-to-fit和shrink-to-fit=no

Bootstrap v4-alpha看到了shrink-to-fit=no,又出现了一个新的幺蛾子

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

2017-03-12修改 - 理解错误,我好傻 
于是各种查,这一查,就是两天,因为shrink-to-fitshrink-to-fit=no不一样,一个是没值的,一个有值的 

* 浏览器的shrink-to-fit是这个http://www.w3help.org/zh-cn/causes/RD8025 
<meta>标签中的shrink-to-fit=no是这个http://div.io/topic/1409,下面说这个 

shrink-to-fit=no

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

<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.

参考

http://div.io/topic/1409 
https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_0.html#//apple_ref/doc/uid/TP40014305-CH9-SW36

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值