html - 背景附件 :fixed not working in chrome

标签 html css google-chrome

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

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>

最佳答案

我只是有一个类似的问题,我的封面 + 修复不起作用,图像在 chrome 上消失并且能够像这样解决它:

爬到更高的节点定义并禁用一些可能有冲突的 CSS 属性,例如在我的例子中,有一个:

backface-visibility: hidden<body>导致它的水平。这是由 animate.css 框架引入的。

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

关于html - 背景附件 :fixed not working in chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19028851/

相关文章:

html - 在 div 中居中图像元素

html - 在 I.E 11 中加载网络字体时出现问题 - 部分浏览器,并非所有浏览器

html - 列之间的表格边框

html - Internet Explorer 8 'background-color' 问题

html - 如何添加溢出:visible to tooltip if parent is overflow:hidden?

javascript - 为什么我的网站可以在某些 Chrome、Opera 和 Safari 中运行,但不能在 FireFox 或 IE 中运行?

java - 使用 XSLT 将 XML 转换为 HTML

html - 我的网站在本地主机上看起来很完美,但在线上传后看起来完全不同?

javascript - 避免在 chrome 扩展中弹出 HTTP 身份验证(摘要)

javascript - 使用一个 jquery 函数设置多表单选择下拉列表的样式