html5 - Color transitions animation in jquery -
how animate between colors using jquery, i.e. fade out 1 color , fade in another.
i know can done css3 keyframes, doesn't work in net explorer mentioned w3schools. want standard method can work in browsers.
on search in stackoverflow, mentioned jquery color plugin required. know simpler method doing it?
you can seek this: live demo
css
#content { width: 100%; background: #eff6f4; transition: background 4s linear; -webkit-transition: background 4s linear; -moz-transition: background 4s linear; }
jquery
$('#content').css('background', '#c89cbd');
this alter background color in 4 seconds.
update
if need ie, can have this:
$('#content').fadeout(500, function(){ $(this).css('background', bg).fadein(2000); });
it won't good, works. live demo
jquery html5 css3
No comments:
Post a Comment