Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.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
Wordpress div中的背景色不';我不能在iphone上工作_Wordpress_Css_Responsive Design_Media Queries - Fatal编程技术网

Wordpress div中的背景色不';我不能在iphone上工作

Wordpress div中的背景色不';我不能在iphone上工作,wordpress,css,responsive-design,media-queries,Wordpress,Css,Responsive Design,Media Queries,我对该网站做了一些媒体查询 问题是,当我在iphone上查看网站时,中间和底部的背景色不起作用。当我添加-1边距以防止div之间出现间隙时,问题就开始了。我试着去掉负的边距,看看这是否有帮助,但没有效果 我做错了什么?在这个规则中,进入这个媒体查询 @media only screen and (max-width: 480px), screen and (max-device-width: 480px), screen and (max-width: 600px) { /* ...some

我对该网站做了一些媒体查询 问题是,当我在iphone上查看网站时,中间和底部的背景色不起作用。当我添加-1边距以防止div之间出现间隙时,问题就开始了。我试着去掉负的边距,看看这是否有帮助,但没有效果


我做错了什么?

在这个规则中,进入这个媒体查询

@media only screen and (max-width: 480px), screen and (max-device-width: 480px),
screen and (max-width: 600px)  {
/* ...some other stuff here... */
    #middle {
        background: #00ffff;
        float: none;
        margin: -1px 0 0 0;
        width: 100%;
        clear: both;
    }
/* ...some more stuff here... */
您是否可以尝试添加
溢出:隐藏?同样在
#底部

#bottom {
    background: #fff;
    float: none;
    margin: -1px 0 0 0;
    width: 100%;
    clear: both;
    overflow:hidden; /* ADD THIS PROPERTY ON BOTH */
}

我认为问题在于您正在删除
浮点
,因此容器将不会。。。不再包含其内容。

在此规则中,输入此媒体查询

@media only screen and (max-width: 480px), screen and (max-device-width: 480px),
screen and (max-width: 600px)  {
/* ...some other stuff here... */
    #middle {
        background: #00ffff;
        float: none;
        margin: -1px 0 0 0;
        width: 100%;
        clear: both;
    }
/* ...some more stuff here... */
您是否可以尝试添加
溢出:隐藏?同样在
#底部

#bottom {
    background: #fff;
    float: none;
    margin: -1px 0 0 0;
    width: 100%;
    clear: both;
    overflow:hidden; /* ADD THIS PROPERTY ON BOTH */
}
我认为问题在于您正在删除
浮点
,因此容器将不会。。。不再包含它的内容