Css 媒体查询赢得';我的Wordpress主题不适用';网站标志
我使用的是WordPress主题名为Spaced。我已经设置了一个网站的标志,但我似乎不能使标志响应。该标志仅对某些媒体查询做出响应,但对手机屏幕尺寸没有响应 我将站点徽标的位置从标题下方的中心更改为标题上方的左侧。我认为这可能是个问题,但我不确定。我做错什么了吗?我怎样才能使我的徽标具有响应性?我的网站链接是:davenport.ryannemurphy.com。我用于徽标的CSS代码如下所示:Css 媒体查询赢得';我的Wordpress主题不适用';网站标志,css,wordpress,media-queries,media,responsive,Css,Wordpress,Media Queries,Media,Responsive,我使用的是WordPress主题名为Spaced。我已经设置了一个网站的标志,但我似乎不能使标志响应。该标志仅对某些媒体查询做出响应,但对手机屏幕尺寸没有响应 我将站点徽标的位置从标题下方的中心更改为标题上方的左侧。我认为这可能是个问题,但我不确定。我做错什么了吗?我怎样才能使我的徽标具有响应性?我的网站链接是:davenport.ryannemurphy.com。我用于徽标的CSS代码如下所示: @media only screen and (max-width: 600px) { .cust
@media only screen and (max-width: 600px) {
.custom-logo {margin-top: 25px;
position: absolute;}
@media only screen and (max-width: 768px) {.header-image {height: 100px;}
.custom-logo {width: 50%;
margin-top: -20px;
}
}
@media only screen and (max-width: 900px) {
.custom-logo {width: 50%;
position: relative;}
}
@media only screen and (max-width: 1100px){
.custom-logo {width: 50%;
margin-top: -20px;
position: relative;
}
}
@media only screen and (max-width: 1500px){.custom-logo{margin-left: 100px;}}
@media only screen and (max-width: 1650px){.custom-logo {margin: 30px; }}
@media only screen (min-width: 1651px) and (max-width: 1850px){.custom-logo {width: 90%;}}
@media only screen and (max-width: 1950px){
.custom-logo {margin-left: -100px;
margin-top: -98px;
position: absolute;}
}
我相信您在附加的CSS的第3行中缺少了一个结束括号(“}”) 使用在线CSS格式化程序(例如)格式化CSS代码,您将看到,由于缺少花括号,大多数媒体查询实际上位于层次结构中第一个查询的下方
不确定这是否是问题的原因,但这肯定会使浏览器感到困惑,并导致bug。您的html中有一个硬编码的