How to paint half of a letter or text in HTML(CSS)?
This question already has an answer here:
You can try it with gradients as Robbie suggested. There is only one down side of this. You won't be able to use text-shadow property (except with another hack - make duplicate of text and give it the shadow property)
Edited on request...
p {
font-size: 12px;
background: -webkit-linear-gradient(#000, #DDD);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
Source code can be found here https://css-tricks.com/snippets/css/gradient-text/
链接地址: http://www.djcxy.com/p/23784.html上一篇: 有没有办法用不同的颜色部分填充文本?