【问题标题】:Background cover + parallax背景覆盖+视差
【发布时间】:2014-04-28 16:38:22
【问题描述】:

我正在制作带有固定背景和封面的整页。

当我添加视差时 - 动画看起来很棒,但它滞后了这么多,我不知道为什么。 我的电脑不错,所以不是这个问题,我之前给别人做了视差,这并不落后。

有什么办法吗?

背景

section#section-1{
background:url("../img/section-1-bg.jpg")50% 0px no-repeat fixed;
-webkit-background-size:cover;
-moz-background-size:cover;
-o-background-size:cover;
-ms-background-size:cover;
background-size:cover;
}

视差插件:jQuery Parallax 版本 1.1.3

【问题讨论】:

标签: jquery css fixed parallax cover


【解决方案1】:

问题在于背景尺寸属性。当你移除它时,它应该运行顺畅。

有一个 jQuery 插件可以拉伸背景图像并且使用的资源比 css background-size 少。 http://srobbin.com/jquery-plugins/backstretch/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-03
    • 2013-02-09
    • 1970-01-01
    • 1970-01-01
    • 2021-03-30
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    相关资源
    最近更新 更多