Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/362.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
Html 仅定义iphone和ipad媒体查询?_Html_Css_Twitter Bootstrap_Media Queries - Fatal编程技术网

Html 仅定义iphone和ipad媒体查询?

Html 仅定义iphone和ipad媒体查询?,html,css,twitter-bootstrap,media-queries,Html,Css,Twitter Bootstrap,Media Queries,我已经试着理解如何覆盖引导媒体查询一段时间了,但我仍然不理解如何禁用某些媒体查询(我必须手动覆盖每个元素吗?) 我的媒体查询如下: /* anything > ipad */ @media only screen and (min-width: 972px) { .container { width: 960px; } } /* iPhone portrait */ @media only screen and (min-device-width: 320

我已经试着理解如何覆盖引导媒体查询一段时间了,但我仍然不理解如何禁用某些媒体查询(我必须手动覆盖每个元素吗?)

我的媒体查询如下:

/* anything > ipad */
@media only screen and (min-width: 972px) {
    .container {
        width: 960px;
    }
}

/* iPhone portrait */
@media only screen and (min-device-width: 320px) and (max-device-width: 479px) and (orientation: portrait) {

}

/* iPad portrait */
@media only screen and (max-device-width: 640px) and (orientation: portrait)  {

}

我希望我的站点在iPad+桌面上有一个960px的容器,并在任何少于iPhone的设备上加载全屏图像。如果平板电脑或设备的最大宽度为700px,他们将获得一个960px宽的带有水平滚动条的站点。我不确定如何使用bootstrap 3实现这一点,我不会使用更少的工具。

根据这一点,它应该可以工作,但您是否在css中定义了容器宽度?如果是这样的话,除了您在这里定义的宽度之外,它将为每个尺寸使用定义的宽度。我认为在Bootstrap中有一个最大宽度为768px的断点,您可以用它定义另一个宽度,这样它就不会滚动。只需根据需要自定义网格断点和容器大小:在getbootstrap.com上尝试自定义程序。@Christina cvrebert已经提到了,谢谢。