文字颜色滚动效果

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_17079071/article/details/86636126


.card .card-body:hover{
    background-image: linear-gradient(to right,black,black,white,black,black,white);    
            -webkit-text-fill-color: transparent;
            -webkit-background-clip: text;
            -webkit-background-size: 200% 100%;
            animation: bgp 0.6s infinite linear;
            animation-iteration-count:1;
            -webkit-animation-iteration-count:1; /* Safari 和 Chrome */
}
 @-webkit-keyframes bgp{
            0%{
                background-position: 0 0;
            }
            100%{
                background-position: -100% 0;
            }
        }

猜你喜欢

转载自blog.csdn.net/qq_17079071/article/details/86636126