背景图像在Chrome中滚动时消失

时间:2014-05-20 11:45:24

标签: html css

我的网站顶部有一个导航栏。每当我向下滚动时,似乎超过窗口高度的100%,背景图像就会消失。

Here is an example of the issue.

该功能在Safari中运行良好!

<nav>
    <ul>
    <li><a href="/">ABOUT</a></li>
    <li><a href="/blog/">BLOG</a></li>
    <li><a href="/work/">WORK</a></li>
    <li><a href="/contact/">CONTACT</a></li>
    </ul>
</nav>
<div class="nav_bg">
</div>

div.nav_bg{
    height: 72px;
    width: 100%;
    background-size: 100%;
    background-attachment: fixed;
    background-color: #2c2c2c;
    z-index: -10;
    position: absolute;
    top: 0;

    background-image: radial-gradient(transparent, rgba(0,0,0,0.4)),
                  url(http://ingledow-staging.s3.amazonaws.com/media/blog/2014/05/18/DSCF6517.jpg);
}

0 个答案:

没有答案