css实现文字颜色渐变

<p class="linecolor">文字颜色渐变</p>
<style type="text/css">
    .linecolor{
        font-size: 30px;
            background-image:-webkit-linear-gradient(bottom,red,#fd8403,yellow); 
            -webkit-background-clip:text; 
            -webkit-text-fill-color:transparent; 
    }
</style>

  效果:

 

 

  

posted @ 2021-04-21 18:09  程序员瑶琴  阅读(199)  评论(0)    收藏  举报