Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 设置容器最小宽度的正确方法是什么?_Css_Grid_Twitter Bootstrap 3_Horizontal Scrolling - Fatal编程技术网

Css 设置容器最小宽度的正确方法是什么?

Css 设置容器最小宽度的正确方法是什么?,css,grid,twitter-bootstrap-3,horizontal-scrolling,Css,Grid,Twitter Bootstrap 3,Horizontal Scrolling,我的网站的设计是为最低分辨率1200px(引导方面的大型设备桌面)而设计的。我希望屏幕分辨率较低的人有水平滚动 我有以下模板: <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> //...menu </div> </div> <di

我的网站的设计是为最低分辨率1200px(引导方面的大型设备桌面)而设计的。我希望屏幕分辨率较低的人有水平滚动

我有以下模板:

<body>

    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            //...menu
        </div>
    </div>

    <div class="container">
        <div class="row">
            <div class="col-lg-8">
                <div id="table-trips-list">
                    //...grid content
                </div>
            </div>

            <div class="col-lg-4">
                <div id="search-drivers">
                    //...filters
                </div>
            </div>
        </div>
    </div>

</body>

//…菜单
//…网格内容
//…过滤器

正确的方法是什么?

以包含块的百分比定义最小宽度

或者用px的方式,

 .container{
 min-width:1200px;         
 width: auto !important;   /* Firefox will set width as auto */
 width:1200px;             /* As IE ignores !important it will set width as 1000px; */
}
或者查看此堆栈溢出链接。它可能会有所帮助

我在我的网站上用过这样的方式

   @media screen and (max-width:320px) { */Your styles*/}
   @media screen and (min-width:321px) and (max-width:639px) {}
   @media screen and (min-width:640px) and (max-width:959px) {}
   @media screen and (min-width:960px) and (max-width:1279px) {}
   @media screen and (min-width:1280px) and (max-width:1599px) {}
   @media screen and (min-width:1600px) {}
   @media screen and (min-width:1920px) {}

以包含块的百分比定义最小宽度

或者用px的方式,

 .container{
 min-width:1200px;         
 width: auto !important;   /* Firefox will set width as auto */
 width:1200px;             /* As IE ignores !important it will set width as 1000px; */
}
或者查看此堆栈溢出链接。它可能会有所帮助

我在我的网站上用过这样的方式

   @media screen and (max-width:320px) { */Your styles*/}
   @media screen and (min-width:321px) and (max-width:639px) {}
   @media screen and (min-width:640px) and (max-width:959px) {}
   @media screen and (min-width:960px) and (max-width:1279px) {}
   @media screen and (min-width:1280px) and (max-width:1599px) {}
   @media screen and (min-width:1600px) {}
   @media screen and (min-width:1920px) {}

以包含块的百分比定义最小宽度

或者用px的方式,

 .container{
 min-width:1200px;         
 width: auto !important;   /* Firefox will set width as auto */
 width:1200px;             /* As IE ignores !important it will set width as 1000px; */
}
或者查看此堆栈溢出链接。它可能会有所帮助

我在我的网站上用过这样的方式

   @media screen and (max-width:320px) { */Your styles*/}
   @media screen and (min-width:321px) and (max-width:639px) {}
   @media screen and (min-width:640px) and (max-width:959px) {}
   @media screen and (min-width:960px) and (max-width:1279px) {}
   @media screen and (min-width:1280px) and (max-width:1599px) {}
   @media screen and (min-width:1600px) {}
   @media screen and (min-width:1920px) {}

以包含块的百分比定义最小宽度

或者用px的方式,

 .container{
 min-width:1200px;         
 width: auto !important;   /* Firefox will set width as auto */
 width:1200px;             /* As IE ignores !important it will set width as 1000px; */
}
或者查看此堆栈溢出链接。它可能会有所帮助

我在我的网站上用过这样的方式

   @media screen and (max-width:320px) { */Your styles*/}
   @media screen and (min-width:321px) and (max-width:639px) {}
   @media screen and (min-width:640px) and (max-width:959px) {}
   @media screen and (min-width:960px) and (max-width:1279px) {}
   @media screen and (min-width:1280px) and (max-width:1599px) {}
   @media screen and (min-width:1600px) {}
   @media screen and (min-width:1920px) {}