Wordpress固定标题在移动滚动中消失

时间:2018-05-16 20:09:34

标签: css wordpress

我有一个独特的问题,希望有人可以帮忙修复。

我已经在CSS上调整了我的WordPress标题,取消了背景颜色,以便可以看到背景图像(它是一个白色的.png图像,底部边缘有透明度,因此有一个图案而不是直线在其底部边界处的线)。 请参阅http://m.piccolo.co.ilhttps://piccolo.co.il(2个不同的网站)。

标题的背景图像位置:固定(#masthead)

当您向Chrome或Explorer等浏览器向下滚动时,此功能正常。但是,当我在IOS移动设备上滚动时,标题的背景图像会在某些时候消失,只会保留切换栏和徽标。 screenshot from IOS10 - Iphone SE

这是标题的CSS:

    #ht-masthead{
        background-image: url('http://www.piccolo.co.il/wp-content/uploads/2017/04/ht-mast.gif'); 
    background-repeat: no-repeat;
    background-size: 100% 100px;
        background-attachment: fixed !important;
width: 100%;
position: fixed;
top: 0;
z-index: 99;
    transform: translateZ(0);
    -moz-transform: translatez(0);
    -ms-transform: translatez(0);
    -o-transform: translatez(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased; 
}

任何建议都会很棒,我对此感到非常沮丧。

1 个答案:

答案 0 :(得分:0)

好像我管理了一个"补丁解决方案"使用标签后的CSS。 我给了#masthead:在这些属性强迫撕裂的背景背景之后。

我现在只将它应用到m.piccolo.co.il,就像这样:

#ht-masthead:after {
content: '';
position: absolute;
left: 0;
height: 100px;
right: 0;
background-repeat: repeat-x;
background-size: stretch;

background-image: url('http://m.piccolo.co.il/wp-content/uploads/2018/05/ht-mast2-1.png');

}

有什么想法? 感谢

相关问题