background-attachment:固定不在铬中工作 [英] background-attachment:fixed not working in chrome

查看:107
本文介绍了background-attachment:固定不在铬中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网站,其中使用了 background-attachment:fixed
属性。它在Firefox中工作正常,但图像不固定。在Chrome中,它表现正常。这是代码:

CSS:

  .AboutBg 
{
background-attachment:fixed;
background-image:url(../ Images / LandingPage / smart.jpg);
background-position:0 0;
background-repeat:repeat;
background-size:cover;
身高:90%;
位置:绝对;
宽度:100%;
}

HTML:

 < div class =AboutBg>< / div> 


解决方案

我刚刚有一个类似的问题,我的封面+没有工作,图像在chrome上消失,并能够像这样解决它:



抓取更高的节点定义并禁用一些可能有冲突的CSS属性,例如,在我的情况下,在

backface-visibility:hidden >< body> 造成它的级别。这是由animate.css框架引入的。



对不起,它不是一个具体的答案,但至少这提供了一些关于如何调试你的css代码的想法。


I am developing a website in which I have used the background-attachment:fixed property. It's working fine in Firefox, but the image is not fixed. In Chrome it's behaving normal. Here is code:

CSS:

.AboutBg
{
    background-attachment: fixed;
    background-image: url("../Images/LandingPage/smart.jpg");
    background-position: 0 0;
    background-repeat: repeat;
    background-size: cover;
    height: 90%;
    position: absolute;
    width: 100%;
}

HTML:

<div class="AboutBg"></div>

解决方案

I just had a similar issue, my cover + fixed was not working and images were disappearing on chrome and was able to solve it like this:

Crawl to higher node definitions and disable some of the CSS properties that may have conflicts, in my case for example, there was a:

backface-visibility: hidden at the <body> level that was causing it. This was being introduced by the animate.css framework.

Sorry its not a concrete answer but at least this provides some idea of how to debug your css code.

这篇关于background-attachment:固定不在铬中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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