css 魔幻属性之 文字渐变

二话不说直接上代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>渐变</title>
    <style>
    .test {
        font-size: 30px;
        text-align: center;
        color: #f35626;
        background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        -webkit-animation: move 10s infinite linear;
    }
    @keyframes move {
        0% {
            -webkit-filter: hue-rotate(0deg);
        }
        100% {
            -webkit-filter: hue-rotate(-360deg);
        }
    }
    </style>
</head>
<body>
    <div class="test">我会渐变</div>
</body>

</html>

猜你喜欢

转载自blog.csdn.net/primedream_RYH/article/details/82805173