我正在开发一个 wordpress 主题,我想让我的 Logo 覆盖在我的 slider 上。
我尝试了几种使用 css 的方法。但它似乎在较小的屏幕上变大了。我应该使用媒体查询并使其在较小的屏幕上不可见吗?
我的 CSS 代码到 Logo 图像。
@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;
}
最佳答案
如果我做对了,你想使 Logo 响应横幅顶部。为此,您需要使用 % 值而不是高度和宽度的像素。此外,位置必须以 % 为单位,以便它会随页面重新缩放。
关于html - Logo 覆盖我的 slider wordpress,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36620630/