Radial gradients are in an implementation mess right now, Safari doesn't support elliptical radial backgrounds (Webkit Nightly does, so support for Safari is coming soon). Chrome has so many versions I'm not sure about it, and IE9 doesn't support them.
So I'd say your best option is faking it through inset box shadows:
发布评论
评论(3)
您可以在这里使用这个工具。当您生成所需内容时,将为您提供代码。
http://www.westciv.com/tools/radialgradients/index.html
http://gradients.glrzad.com/
You can play with this tool here. Will give you the code as you generate what you want.
http://www.westciv.com/tools/radialgradients/index.html
http://gradients.glrzad.com/
径向渐变现在实施混乱,Safari 不支持椭圆形径向背景(Webkit Nightly 支持,所以对 Safari 的支持即将推出)。 Chrome有很多版本我不确定,而且IE9也不支持。
所以我想说你最好的选择是通过插入框阴影来伪造它:
http://jsfiddle.net/nmtHf/
Radial gradients are in an implementation mess right now, Safari doesn't support elliptical radial backgrounds (Webkit Nightly does, so support for Safari is coming soon). Chrome has so many versions I'm not sure about it, and IE9 doesn't support them.
So I'd say your best option is faking it through inset box shadows:
http://jsfiddle.net/nmtHf/
今年深度报道了 Graident 的 24 种方法,如下文章:
http://24ways.org/2010/everything-you-wanted -to-know-about-gradients
在底部,他们用了整个部分来介绍径向渐变,
给你两篇建议阅读的文章:
MDN
Safari
我建议发布 robx 工具,但如果您像我一样,您喜欢额外阅读以了解事物如何工作。
24 Ways covered Graidents in Depth this Year with the following article:
http://24ways.org/2010/everything-you-wanted-to-know-about-gradients
Towards the bottom they spend a whole section on radial graidents and
give you two articles of suggested reading:
MDN
Safari
I would suggest the tool robx posted, but if your like me, you like extra reading on understanding of how things work.