animation3 背景小动画笔记

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .ren {
            width: 48px;
            height: 70px;
            background: url(images/timg.jpg) no-repeat;
            animation: donghua 5s steps(10);
            overflow: hidden;
        }
        @keyframes donghua {
            0% {
                background-position: -8px 0;
            }
            100% {
                background-position: -460px 0;
            }
        }

    </style>
</head>
<body>
<div class="ren"></div>
</body>
</html>

 

posted @ 2017-05-07 10:57  -CLAY-  阅读(218)  评论(0编辑  收藏  举报