background-image animation not working in Firefox

限于喜欢 提交于 2019-12-02 05:40:58

background-position-x and background-position-y are not standards.

If you want to animate, you must modify both values (x and y) with background-position.

look at these sites:

http://snook.ca/archives/html_and_css/background-position-x-y

https://developer.mozilla.org/en/CSS/background-position

It doesn't look like firefox supports backgroundPositionY property so you need to use the backgroundPosition property which expects both coordinates.

"backgroundPositionY" in document.createElement("div").style
//true for chrome, false for firefox


"backgroundPosition" in document.createElement("div").style
//true for both

Since jQuery won't support that out of the box, you need to use hook plugin like this

I'm showing a syntax error in slider.js on line 46. Maybe something wasn't closed properly?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!