jquery - Can I animate the change of a background gradient? -
jquery - Can I animate the change of a background gradient? -
i'm trying create gradient fade in background color.
$('body').animate({ background: '-webkit-gradient(linear,left top,left bottom,from(#b0c4ff),to(#6289ff)) fixed)' }, 2000, function(){});
http://jsfiddle.net/mylf9o0j/3/
jquery animate backgroundcolor
animation in css gradient colors
make total page div , add together on background behind other elements. can create animate.
check code below:
class="snippet-code-js lang-js prettyprint-override">function goodmorning(){ $('#background').animate({ opacity: 1 }, 2000); } goodmorning();
class="snippet-code-css lang-css prettyprint-override">body{ background-color: red; } #background{ opacity: 0; position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; z-index: -1; background: -webkit-gradient(linear,left top,left bottom,from(#b0c4ff),to(#6289ff)) fixed; }
class="snippet-code-html lang-html prettyprint-override"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="background"></div> <p>hello :)</p>
jquery jquery-animate gradient
Comments
Post a Comment