【发布时间】:2016-04-14 19:37:38
【问题描述】:
我正在开发一个 wordpress 主题,我想让我的徽标覆盖在我的滑块上。
我尝试了几种使用 css 的方法。但它似乎在更小的屏幕上变得更大。我应该使用媒体查询并使其在较小的屏幕上不可见?
我的标志图像的 CSS 代码。
@media screen and (max-width: 767px) {
.logo img {
display: none !important;
}
}
.header_mid_inner .logo img {
max-height: none !important;
max-width: none !important;
left: 50px !important;
top: 100px !important;
width: 135px !important;
height: 150px !important;
border: 1px solid white !important;
}
【问题讨论】:
-
起初最好不要进行媒体查询以不显示任何徽标。第二个我建议你在左上角使用 % 。如果您想为您的网站提供响应,还可以设置最大高度和最大宽度。如果您发送标题的 html 代码来提供帮助会更好,因为我认为问题在于定位顶部和高度和宽度
标签: html css wordpress wordpress-theming