animation blink 实现闪烁效果

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/huawuque004/article/details/84350724
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        a {
            text-decoration: none;
        }

        .an {
            -webkit-animation: .5s infinite blink;
            animation: .5s infinite blink
        }

        .commodity-sign-wrap {
            animation: blink 1s infinite;
            -webkit-animation: blink 1s infinite;
            /*Safari and Chrome*/
        }

       @keyframes blink{0%,100%{color:red}50%{color:#ff0}}
       @-webkit-keyframes blink{0%,100%{color:red}50%{color:#ff0}}

        @keyframes blink1 {
            0% {
                opacity: 0;
            }

            50% {
                opacity: 100;
            }

            100% {
                opacity: 0;
            }
        }

        @-webkit-keyframes blink1 {
            0% {
                opacity: 0;
            }

            50% {
                opacity: 100;
            }

            100% {
                opacity: 0;
            }
        }
    </style>
</head>

<body>
    <a href="" class="an" blink>最新优惠</a>
</body>

</html>

展开阅读全文

没有更多推荐了,返回首页