css - 修复桌面上的容器(992 像素及以上)

标签 css twitter-bootstrap

如何设置容器为固定大小?

当浏览器有一定尺寸时,我不希望 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,因此您不必手动更改它。

看这里http://getbootstrap.com/customize/#container-sizes

关于css - 修复桌面上的容器(992 像素及以上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25990455/

相关文章:

html - Razor 布局的复选框位置不正确

javascript - 下拉切换在事件处理程序中不起作用

javascript - 我如何在 Bootstrap 方法上打印自定义消息

html - 如何在 3 列之间添加空格

php - Yii2 禁用 Bootstrap Js、JQuery 和 CSS

javascript - 星级评定系统(半星)

html - 当视口(viewport)垂直调整大小时,100% 高度的 Div 会变得比 100% 短

css - 为什么我的按钮左侧的下拉元素不在下方?

css - 更改字幕中第一个字母的大小

javascript - Font Awesome + Bootstrap 工具栏动画问题