<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Rookie Tutorial (runoob.com)</title> <style> div { width:100px; height:100px; background:red; position:relative; animation:mymove 5s infinite; -webkit-animation:mymove 5s infinite; /* Safari and Chrome */ } @keyframes mymove { from {top:0px;} to {top:200px;} } @-webkit-keyframes mymove /* Safari and Chrome */ { from {top:0px;} to {top:200px;} } </style> </head> <body> <p><strong>Note:</strong> @keyframes rules are not compatible with IE 9 and earlier browsers.</p> <div></div> </body> </html>
CSS3-KeyFrames
Make a div element gradually move 200 pixels:
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326226788&siteId=291194637
Recommended
Ranking