Is there a way to create a color gradient in CSS without using an image file?
I am trying to give a DIV a background with a color gradient so that it looks glossy.
Safari (Webkit) supports it: http://webkit.org/blog/175/introducing-css-gradients/
Firefox 3.6+ supports it: https://developer.mozilla.org/en/CSS/-moz-linear-gradient
W3 spec defines support for it: http://dev.w3.org/csswg/css3-images/#gradients-
And you can use Modernizr to detect support and fall back on an image: http://www.modernizr.com/docs/#cssgradients
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With