CSS 动态渐变色字体

时间:2020-11-24 12:44:17   收藏:0   阅读:12
.ys{
    font-weight: 600;
    font-size: 16px;
    font-family: "黑体";
    color: #8c888b;
    background: -webkit-linear-gradient(45deg, #70f7fe, #fbd7c6, #fdefac, #bfb5dd, #bed5f5);

    color: transparent;
    /*设置字体颜色透明*/
    -webkit-background-clip: text;
    /*背景裁剪为文本形式*/
    animation: ran 10s linear infinite;
    /*动态10s展示*/
}

@keyframes ran {
    from {
        backgroud-position: 0 0;
    }
    to {
        background-position: 2000px 0;
    }
}

技术图片

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!