【发布时间】:2018-04-14 06:53:34
【问题描述】:
我正在使用一个名为 Spacious 的 WordPress 主题。我已经设置了一个网站徽标,但我似乎无法使徽标响应。该徽标仅响应某些媒体查询,但不响应移动屏幕尺寸。
我将站点徽标的位置从标题下方的中心更改为左侧的标题上方。我认为这可能是问题,但我不确定。难道我做错了什么?我怎样才能让我的标志响应?我的网站的链接是:davenport.ryannemurphy.com。我用于徽标的 CSS 代码如下:
@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;}
}
【问题讨论】:
-
你能显示你的 index.html 结构吗
标签: css wordpress media-queries media responsive