LineDetail Posted May 5, 2017 Share Posted May 5, 2017 Are gradients backgrounds animatable by transition yet? I googled a answer and only found ones that were years old or had long work-arounds. I'm wondering if there is some new code to use that I am just overlooking. Thanks ahead, -Line Link to comment Share on other sites More sharing options...
Ingolme Posted May 5, 2017 Share Posted May 5, 2017 No, they won't be animatable under the current specification because they are part of the background image property which is not animatable. I use Javascript to animate gradients. Link to comment Share on other sites More sharing options...
dsonesuk Posted May 5, 2017 Share Posted May 5, 2017 How about this one? https://www.gradient-animator.com/ It sets gradient background size of 300% by 300%, then animates background-position left to right. Link to comment Share on other sites More sharing options...
Ingolme Posted May 5, 2017 Share Posted May 5, 2017 You can animate the background position, that's how Bootstrap makes progress bars. Link to comment Share on other sites More sharing options...
dsonesuk Posted May 5, 2017 Share Posted May 5, 2017 I just pointed that out, why do you always repeat what someone has already giving a solution to, you should change your username to parrot. Link to comment Share on other sites More sharing options...
niche Posted May 5, 2017 Share Posted May 5, 2017 (edited) dsonesuk's example is much simpler than the one I found: https://codepen.io/quasimondo/pen/lDdrF Edited May 5, 2017 by niche unexpected result Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now