zoukankan      html  css  js  c++  java
  • CSS3-字体渐变色

    示例:Mauger`s Blog

    <!DOCTYPE HTML>
    <html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Mauger`s Blog</title>
        
        <style type="text/css">
            body {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background-color: black;
            }
        
            .color-a {
                font-size: 48px;
                color: #696969;
                text-decoration: none;
                background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                -webkit-animation: hue 60s infinite linear;
            }
            
            @-webkit-keyframes hue {
                from {
                    -webkit-filter: hue-rotate(0deg);
                    filter: hue-rotate(0deg); 
                }
                to {
                    -webkit-filter: hue-rotate(360deg);
                    filter: hue-rotate(360deg); 
                } 
            }
    
            @keyframes hue {
                from {
                    -webkit-filter: hue-rotate(0deg);
                    filter: hue-rotate(0deg); 
                }
                to {
                    -webkit-filter: hue-rotate(360deg);
                    filter: hue-rotate(360deg); 
                } 
            }
        </style>
    </head>
    <body>
        <a href="https://maugerwu.github.io/" class="color-a">Welcome To Mauger`s Blog</a>
    </body>
    </html>
  • 相关阅读:
    3-8
    3-7
    3-5
    3-4
    3-3
    3-2
    3-1
    2-11
    2-10
    2-9
  • 原文地址:https://www.cnblogs.com/wumz/p/8647054.html
Copyright © 2011-2022 走看看