css3动画
黄舟
黄舟 2017-04-17 11:53:44
0
2
558

我想让他的border在2s内闪动2种颜色没反映,这要怎么写?

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="description" content="Creating Modal Window with Twitter Bootstrap">

    </head>

    <style>
    
        @keyframes borderbg {
            0%   {border: 1px solid red !important;}
            25%  {border: 1px solid #c0ccda !important;}
            50%  {border: 1px solid red !important;}
            100% {border: 1px solid #c0ccda !important;}
        }
        
        @-moz-keyframes borderbg {
            0%   {border: 1px solid red !important;}
            25%  {border: 1px solid #c0ccda !important;}
            50%  {border: 1px solid red !important;}
            100% {border: 1px solid #c0ccda !important;}
        }
        
        @-webkit-keyframes borderbg {
            0%   {border: 1px solid red !important;}
            25%  {border: 1px solid #c0ccda !important;}
            50%  {border: 1px solid red !important;}
            100% {border: 1px solid #c0ccda !important;}
        }
        
        @-o-keyframes borderbg {
            0%   {border: 1px solid red !important;}
            25%  {border: 1px solid #c0ccda !important;}
            50%  {border: 1px solid red !important;}
            100% {border: 1px solid #c0ccda !important;}
        }
        .cl-Input p{
            width: 200px;
            height: 200px;
            border:1px solid #ccc;
            animation: borderbg 2s;
            -moz-animation: borderbg 2s;
            -webkit-animation: borderbg 2s;
            -o-animation: borderbg 2s;
            margin: 20px;
        }    
        
    </style>
    <body>
        
        <p class="cl-Input">
            <p class="el-input__inner">
                
            </p>
            <p class="el-textarea__inner">
                
            </p>
            <p class="note-frame">
                
            </p>
        </p>
    </body>
    <script>
        
    </script>
</html>
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
刘奇

You added it later! important, the color will not change. Went to try it

阿神

Just remove !important.
Add so many! What is important? I don’t understand~
!important is generally not recommended~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template