本文介绍了CSS创建颜色渐变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在CSS中创建一个颜色渐变而不使用图像文件?
Is there a way to create a color gradient in CSS without using an image file?
我试图给一个DIV一个背景颜色渐变,它看起来有光泽。
I am trying to give a DIV a background with a color gradient so that it looks glossy.
推荐答案Safari(Webkit)支持它: webkit/blog/175/introducing-css-gradients/
Safari (Webkit) supports it: webkit/blog/175/introducing-css-gradients/
Firefox 3.6+支持它: developer.mozilla/en/CSS/-moz-linear-gradient
Firefox 3.6+ supports it: developer.mozilla/en/CSS/-moz-linear-gradient
W3规范支持它: dev.w3/csswg/css3-images/#
您可以使用 Modernizr 检测支持并回退到图片上: www.modernizr/docs/#cssgradients
And you can use Modernizr to detect support and fall back on an image: www.modernizr/docs/#cssgradients
更多推荐
CSS创建颜色渐变
发布评论