css文本渐变 [英] css text gradient

查看:137
本文介绍了css文本渐变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果我有一段文字,有没有办法,也许有CSS3逐渐改变文本的颜色,因为它下降到页面?而不是渐变的方式,因为它只是在文字的整个段落而不是文字。



所以我想要一些文本从白色开始,然后褪色成黑色,因为它到段落的末尾。



我真的不知道它可以做...也许有一个java脚本可以做



感谢。

解决方案

但它只能在webkit浏览器(Chrome和Safari)中使用: http://jsfiddle.net/joshnh/DphXz/


I've had alittle look around and can't find anything about this.

If i have a paragraph of text, is there a way, maybe with CSS3 to gradually change the colour of the text as it goes down to the page? instead of the way that gradient does it, because that only does it on the word not the whole paragraph of text.

So i want some text to start off white and then fade into black as it gets to the end of the paragraph.

I'm really not sure it can be done... Maybe there is a java script that can do it.

Thanks.

解决方案

You can do it using CSS but it will only work in webkit browsers (Chrome and Safari): http://jsfiddle.net/joshnh/DphXz/

这篇关于css文本渐变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆