如何使用bootstrap4.0.0-beta为所有宽度设置布局
问题描述:
我想使用bootstrap4.0.0-beta来构建网站。 由于设计此网站的设计人员只设计了一种布局,因此容器宽度为1070px。所以我试图对所有断点使用这个布局,这意味着无论设备宽度如何,它只会显示一个布局。 我现在所做的是删除线: <meta name="viewport" content="width=device-width, initial-scale=1">
并将.container
宽度设置为1100px,但它不起作用,当浏览器宽度更改时,.container仍在更改。如何使用bootstrap4.0.0-beta为所有宽度设置布局
我该如何做这项工作?
谢谢!
答
好,几个小时的研究后,找到一个方法来做到这一点:如果网页至少需要500像素,显示 https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag
使用
<meta name="viewport" content="width=500">
,在我的情况,我将使用:
<meta name="viewport" content="width=1200">