- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Is it possible to have an animated gradient background along with a fixed background image. I know you can add multiple background images and gradients, but what about animated gradients. I need the gradient to sit behind the image and span the full screen size. Any help would be awesome. Thanks
Could be fun. Can be any gradient, like also a SVG-gradient? Lots of possibilities, which als depends upon the markup. Why not start making a demo, share the link here, and iterate upon it.
Not sure it can be achieved with CSS only, the spec says the property isn’t animatable. There’s some fine examples around with JS though.
A workaround by fading in different layers is also an option, this can be done with transitions.
you may use background-size and background position in order to slide your gradient over the background-image … if that is compatible with effect you look for.
http://codepen.io/gc-nomade/pen/OMEovK
Thanks everyone, I can only seem to make it work with including javascript, but as I’m placing it into wordpress finding it a little tricky. The last one with the image works with the multiple background option, only the image is still behind the gradient, not sure how I can get that the other way around.
declare image first and then gradient in the css rules .
first image is on top,
next are under,
this is why, if you want a background-color, you declare it in the last image