您还可以使用
background-clip:text渐变来为文本着色,并且可以轻松实现颜色的任意组合:
#main { background: linear-gradient(to right, red 50%, #fff 50%);}#main>p { background: linear-gradient(to left, blue 50%, #fff 50%); display: inline-block; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color:transparent;}<div id="main"> <p>I am multicolor text. Multicolor text i am. This really does feel great. No duplicated content was needed for this effect. It's created by using blending effects. I am multicolor text. Multicolor text i am. This really does feel great. No duplicated content was needed for this effect. It's created by using blending effects.</p></div>


