Wordpress div中的背景色不';我不能在iphone上工作
我对该网站做了一些媒体查询 问题是,当我在iphone上查看网站时,中间和底部的背景色不起作用。当我添加-1边距以防止div之间出现间隙时,问题就开始了。我试着去掉负的边距,看看这是否有帮助,但没有效果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
我做错了什么?在这个规则中,进入这个媒体查询
@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 */
}
我认为问题在于您正在删除浮点
,因此容器将不会。。。不再包含它的内容