jQuery-动画CSS背景大小? [英] jQuery - Animate css background-size?
本文介绍了jQuery-动画CSS背景大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试设置背景图片的大小,但无法正常工作-从以下代码中知道为什么吗?
I'm trying to animate the size of my background image, but it's not working - Any idea why from the following code?
$(this).animate({'opacity' : 1, 'background-size':'70px 48px', 'right':39, 'top':45}, 250);
请注意:所有其他属性均可正确设置动画,只是背景大小不会更新.
Note: all the other properties animate correctly, it's just the background-size that doesn't update.
谢谢!
推荐答案
因为background-size
是jQuery不支持的CSS3属性,因为它仍然是
Because background-size
is a CSS3 property that is not supported by jQuery yet as it's still a candidate for recommendation.
请参见此插件.
这篇关于jQuery-动画CSS背景大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文