backgroundPositionX不工作的Firefox [英] backgroundPositionX not working on Firefox

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

问题描述

我有YouTube的精灵动画播放,但有一个问题。它不会火狐下工作(但适用于Chrome和IE8)...
这是code: http://goo.gl/4IxkI

I have play with youtube's sprite animation but there is a problem. It won't work under Firefox (but works on Chrome and IE8)... This is the code : http://goo.gl/4IxkI

额外的信息。问题是,Firefox的下它不会改变背景位置(将不播放动画)...有没有错误,只是没有更改背景位置

Extra info: the problem is that under firefox It doesn't change the background position (won't play the animation)... there are no errors, just doesn't change the background position.

请问一个preciate帮助 - 感谢

Will apreciate help - thanks

推荐答案

Firefox不支持backgroundPositionX,但它支持的后台位置

Firefox doesn't support backgroundPositionX, but it does support background position

因此​​,我们可以做这样的事情:

So we can do something like this:

psy.style.backgroundPosition = x+'px 0';

此设置背景位置,X先,那么Y

This sets the background position, X first, then Y.

工作例如这里

这篇关于backgroundPositionX不工作的Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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