css3动画停在最后一帧方法

  1. .class{
                width: 200px;
                height: 100px;
                top: 100px;
                font-size: 50px;
                color: #fff;
                position: absolute;
                animation: move 1s;
                left: 200px;
                opacity: 1;
            }
            @keyframes move{
                from{
                    left: 0px;
                    opacity: 0;
                }
                to{
                    left: 200px;
                    opacity: 1;
                }
            }
    

      

  2. .class{
                width: 200px;
                height: 100px;
                top: 100px;
                font-size: 50px;
                color: #fff;
                position: absolute;
                animation: move 1s;
                animation-fill-mode: forwards;
            }
            @keyframes move{
                from{
                    left: 0px;
                    opacity: 0;
                }
                to{
                    left: 200px;
                    opacity: 1;
                }
            }
    

     

posted @ 2016-03-27 20:45  web_cj  阅读(1711)  评论(0编辑  收藏  举报