如何设置容器为固定大小?
当浏览器有一定尺寸时,我不希望 bootstrap 摆弄容器宽度..
如果浏览器窗口小于 1000 像素,则容器的宽度会缩小以适应窗口。我不想要那个..
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
@media (max-width:768px) {
}
@media (min-width:768px) {
}
@media (min-width:992px) {
.container {
width:1000px;
}
}
@media (min-width:1200px) {
.container {
width:1000px;
}
}
</style>
</head>
最佳答案
您可以使用 boostrap customizer将容器宽度设置为您想要的任何宽度。它将为您生成自定义版本的 CSS,因此您不必手动更改它。
关于css - 修复桌面上的容器(992 像素及以上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25990455/