简体   繁体   English

fullPage.js,内容div放置不正确

[英]fullPage.js, content div not properly placed

You can see my problem and the code in the link below. 您可以在下面的链接中查看我的问题和代码。 I am trying to make the .bg div to completly cover the first section, but it ends up only covering 50%. 我正在尝试使.bg div完全覆盖第一部分,但最终仅覆盖50%。

http://oskarvertetics.kaggteknik.se/portfolio/test2 http://oskarvertetics.kaggteknik.se/portfolio/test2

I have tried playing around with different margins and paddings on different elements but can not get it to work in any way. 我尝试过在不同元素上使用不同的边距和填充,但是无法使其以任何方式工作。

Any help would be appreciated! 任何帮助,将不胜感激!

You can try to add top:0; 您可以尝试添加top:0; in your .bg css 在您的.bg CSS中

.bg {
 opacity: 0.5;
 position: absolute;
 width: 100%;
 height: 100%;
 -webkit-transition: opacity 5s;
 -moz-transition: opacity 5s;
 transition: opacity 5s;
 top: 0;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM