码迷,mamicode.com
首页 > 其他好文 > 详细

step()动画

时间:2017-08-26 19:39:51      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:webkit   eps   ext   nim   inf   ini   mat   ram   frame   

<style type="text/css">
.hi {
    width: 50px;
    height: 72px;
    background-image: url("http://s.cdpn.io/79/sprite-steps.png");
    
    -webkit-animation: play .8s steps(10) infinite;
       -moz-animation: play .8s steps(10) infinite;
        -ms-animation: play .8s steps(10) infinite;
         -o-animation: play .8s steps(10) infinite;
            animation: play .8s steps(10) infinite;
}

@-webkit-keyframes play {
   from { background-position:    0px; }
     to { background-position: -500px; }
}

@-moz-keyframes play {
   from { background-position:    0px; }
     to { background-position: -500px; }
}

@-ms-keyframes play {
   from { background-position:    0px; }
     to { background-position: -500px; }
}

@-o-keyframes play {
   from { background-position:    0px; }
     to { background-position: -500px; }
}

@keyframes play {
   from { background-position:    0px; }
     to { background-position: -500px; }
}
</style>
</head>
<body>
<img src="http://s.cdpn.io/79/sprite-steps.png" />
<div class="hi"></div>
</body>

  

step()动画

标签:webkit   eps   ext   nim   inf   ini   mat   ram   frame   

原文地址:http://www.cnblogs.com/candy-Yao/p/7436086.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!