gpt4 book ai didi

css - Wordpress - 使背景图像覆盖 100% 视口(viewport)高度

转载 作者:太空宇宙 更新时间:2023-11-04 08:43:48 25 4
gpt4 key购买 nike

我正在为 wordpress 博客制作整页视差图像标题。我已将以下样式应用于标题图像(我通过在开发工具中检查它找到了 css 类)。

.header {
background: no-repeat center;
background-size: cover;
-moz-background-size: cover;
-webkit-background-size: cover;
height: 100vh;
margin: 0;
background-attachment: fixed;
position:relative;
}

即使在应用此图像后,向下滚动图像后,我仍会注意到图像下方有一个很大的空白区域。您可以在此处查看问题:http://bakemachine.com/travel/

如何解决这个问题?我正在使用海明威主题并且是 wordpress 开发的新手。提前致谢!

最佳答案

要删除图像下方的间隙,只需重写 .section-inner 上的 margin 规则。这个类在导航里面。

.section-inner {
width: 1040px;
max-width: 86%;
margin: 0 auto; // this rule is changed
}

关于css - Wordpress - 使背景图像覆盖 100% 视口(viewport)高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43920188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com