CSS字体动态渐变

<div class = "myTest">test</div>

<style>
    .myTest{
                      background:-webkit-linear-        
                gradient(left,#147B96,#E6D205 25%,#147B96 
          50%,#E6D205 75%,#147B96);
          color:transparent;
          -webkit-background-clip:text;
          background-size:200% 100%;
          animation:masked-animation 1s infinite linear;
    }
     @-webkit-keyframes masked-animation {
        100% {
          background-position:-100% 0;
        }
      }
</style>    
View Code

 

posted @ 2019-06-11 09:55  小生怕痒  阅读(770)  评论(0编辑  收藏  举报