2011-12-08 132 views
0

我想弄清楚如何淡入淡出我的网站的CSS背景颜色。不过,我只是用div或标签获取背景图片才能淡入淡出。没有只是一个CSS背景颜色的例子淡入。CSS背景淡入淡出使用jquery

<style type="text/css"> 
body { 
    background-color: #F00; 
} 
</style> 

任何帮助将是伟大的,在计算这个简单的问题。

大卫

+0

http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor这可能会帮助 – Joshc

回答

1

有可用的,可以轻松地完成此功能几个插件:

jQuery Color Plugin

jQueryUI Color Animations:

Bitstorm Color Animation

使用几乎所有的人:

$('body').animate({ backgroundColor: "White" }, 'slow'); 


$(this).animate({ backgroundColor: "black" }, 1000); 
+0

你碰巧有该网站的JavaScript,因为该网站是关闭它似乎? – StealthRT

+0

@Rionmonster插件网站当前不可用。 –

+0

这里是一个教程,可能包括在下载插件:http://desizntech.info/2009/06/playing-with-jquery-color-plugin-and-color-animation/ –