Google以非常奇怪的方式映射api v3影响固定元素

时间:2013-12-17 20:35:40

标签: google-maps-api-3 css-position

问题网址:[已删除]

每当我调整窗口大小,滚动页面或鼠标悬停在元素上时,我的固定标题会自行扭曲。它甚至受 fast 滚动的影响。我发现其他人有类似的问题,但尝试解决方案还没有解决它。

固定元素的CSS:

#header-wrap {
    background: url(/_images/template/wood-background.jpg) no-repeat;
    background-attachment: fixed;
    background-size: 100%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 56;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, .85);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -o-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    opacity: 1;
}

其中一个解决方案要求添加转换属性,这在某些时候确实解决了问题。

1 个答案:

答案 0 :(得分:0)

如果我删除:

background-attachment: fixed;
一切似乎都没问题。