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>