纯CSS3文本颜色渐变 - 是可能吗? [英] Pure CSS3 text color gradient - Is it possible?
问题描述
有没有办法创建跨浏览器,纯CSS3文字颜色渐变?
所以,没有png。没有'webkit'。
So, no png's. No 'webkit' only.
编辑:更准确地说:它仅适用于CSS3,而且适用于文字而非箱形渐变。
To be more precise: It's CSS3 only, and it's for text, not box gradients.
I found this solution, but it's only for webkit.
推荐答案
在webkit之外没有跨浏览器的方法,因为只有webkit目前有 background-clip:text 和此背景扩展-clip 不在标准轨道(据我所知)。如果你想放松CSS3的要求,你可以用Canvas(或SVG)来实现跨浏览器的效果,但是你只是在谈论支持HTML5的浏览器。
There is no cross-browser way to do this outside webkit because only webkit currently has a background-clip: text, and this extension to background-clip is not on standards track (as far as I am aware). If you want to relax your CSS3 requirement, you can accomplish the same effect cross-browser with Canvas (or SVG), but then you're talking about HTML5-capable browsers only.
这篇关于纯CSS3文本颜色渐变 - 是可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!