Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS create color gradient

Tags:

css

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.

like image 729
Brian Avatar asked Dec 13 '22 00:12

Brian


1 Answers

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

like image 105
Nicole Avatar answered Dec 27 '22 18:12

Nicole