背景图像在Microsoft Edge中消失 [英] Background Image disappearing in Microsoft Edge

查看:136
本文介绍了背景图像在Microsoft Edge中消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,当使用 background-attachment:fixed 时,我的背景图像在Microsoft Edge中消失了.但是在IE,Chrome和Firefox中可以正常工作.

For some reason, my background images disappear in Microsoft edge when using background-attachment: fixed. However works fine in IE, Chrome and Firefox.

css如下:

header
{
    text-align: center;
    color: #eee;
    background: url(../img/portfolio/66.jpg);
    background-size: cover;
    background-position: 70% 0%;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

有什么想法吗?

此致

史蒂夫

推荐答案

我在新的视差项目中也遇到了类似的问题,我不确定是因为我设置了div的背景附件.或溢出:隐藏.

I have similar issue on my new parallax project, i am not sure is it because i set my div background-attachment: fixed; or overflow:hidden.

但是当我尝试将背景CSS移到如下所示的innner div时,我的问题解决了.

But when I tried to move my background css to innner div like below, my problem solved.

<div class"header"><div class="bg"></div></div>

这篇关于背景图像在Microsoft Edge中消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆