【问题标题】:Error: 'Can not get property 'replace' of undefined reference or null' only on IE错误:仅在 IE 上“无法获取未定义引用或 null 的属性“替换”
【发布时间】:2013-07-08 18:33:23
【问题描述】:

我正在尝试使用 Jquery Spritely 实现一个简单的动画。 问题是在 Chrome、Firefox 和 Safari 上一切正常。 但是在 IE 上我得到了以下错误: '无法获取未定义引用或 null 的属性'替换''

小提琴是here

<div class="container">
    <div id="citybackground"></div>

    <div id="cityclouds"></div>

     <div id="motoboy"></div>
</div>



 $(document).ready(function() {
                $('#citybackground').pan({ fps:30, speed: 3, dir: 'left' });
                $('#cityclouds').pan({ fps: 30, speed: 2, dir: 'right' });
            });

【问题讨论】:

    标签: jquery internet-explorer animation spritely


    【解决方案1】:

    必须为 IE10 解析“背景”CSS 属性。

    repeat-x bottom; / BROKEN */
    repeat-x 100px 10px; /* WORKS */
    

    edit如果您使用底部,您可能希望在 css 中分别指定 background-position 和/或 background-attachment 属性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-09
      • 1970-01-01
      • 2018-12-04
      • 2015-11-01
      • 2018-03-24
      相关资源
      最近更新 更多