Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery ui 如何仅使用jQuery为添加背景色设置动画?_Jquery Ui - Fatal编程技术网

Jquery ui 如何仅使用jQuery为添加背景色设置动画?

Jquery ui 如何仅使用jQuery为添加背景色设置动画?,jquery-ui,Jquery Ui,jQuery的动画功能不适用于背景色。如何在不添加jQuery UI或其他插件的情况下顺利地将背景颜色从白色变为彩色?您可以通过使用fadeIn()的简单技巧实现这一点 $('element').css('background-color','red'); $('element').hide(); $('element').fadeIn(500);

jQuery的动画功能不适用于背景色。如何在不添加jQuery UI或其他插件的情况下顺利地将背景颜色从白色变为彩色?

您可以通过使用fadeIn()的简单技巧实现这一点

$('element').css('background-color','red');
$('element').hide();
$('element').fadeIn(500);