How to Animate Gradients using CSS

Please try this code: #gradient { height:300px; width:300px; border:1px solid black; font-size:30px; background: linear-gradient(130deg, #ff7e00, #ffffff, #5cff00); background-size: 200% 200%; -webkit-animation: Animation 5s ease infinite; -moz-animation: Animation 5s ease infinite; animation: Animation 5s ease infinite; } @-webkit-keyframes Animation { 0%{background-position:10% 0%} 50%{background-position:91% 100%} 100%{background-position:10% 0%} } @-moz-keyframes Animation { 0%{background-position:10% 0%} 50%{background-position:91% 100%} 100%{background-position:10% 0%} … Read more

angular 2 animation vs css animation – when to use what?

The question is actually more javascript animation vs css animation (because angular2’s animations are based on javascript-animation). The answer is that when you can – use CSS animation. Modern browsers uses different thread for CSS animation, so the javascript-thread is not affected by the CSS animations. You can use the HTML5 Animation Speed Test to … Read more

Can we modify a Font Awesome spin speed?

Short answer Yes, you can. Replace the .fa-spin class on the icon with a new class using your own animation rule: .slow-spin { -webkit-animation: fa-spin 6s infinite linear; animation: fa-spin 6s infinite linear; } <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css”/> <i class = “fa fa-cog fa-5x slow-spin”></i> Longer answer If you look at the Font Awesome CSS file, … Read more

Pure CSS animation visibility with delay

You are correct in thinking that display is not animatable. It won’t work, and you shouldn’t bother including it in keyframe animations. visibility is technically animatable, but in a round about way. You need to hold the property for as long as needed, then snap to the new value. visibility doesn’t tween between keyframes, it … Read more