移动设备优先: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">width 属性控制设备的宽度。假设您的网站将被带有不同屏幕分辨率的设备浏览,那么将它设置为 device-width 可以确保它能正确呈现在不同设备上。
initial-scale=1.0 确保网页加载时,以 1:1 的比例呈现,不会有任何的缩放。
maximum-scale=1.0 与 user-scalable=no 一起使用:这样禁用缩放功能后,用户只能滚动屏幕 响应式图片:<img src="..." class="img-responsive" alt="响应式图像">.img-response{
display:block;
height:auto;
max-width:100%;
}
height:auto表示在父容器中所占比例保持不变,可自动缩放
bootstrap响应式
最新推荐文章于 2019-05-27 11:49:00 发布