编辑下面的代码:【加编码】
<html> <head> <style> div { width:100px; height:100px; background:red; position:relative; animation-name:mymove; animation-duration:5s; /* Safari and Chrome */ -webkit-animation-name:mymove; -webkit-animation-duration:5s; } @keyframes mymove { from {left:0px;} to {left:200px;} } @-webkit-keyframes mymove /* Safari and Chrome */ { from {left:0px;} to {left:200px;} } </style> </head><body> <p><strong>Note:</strong> The animation-name property is not supported in Internet Explorer 9 and earlier versions.</p> <div></div> <p><b>Note:</b> Always specify the animation-duration property. Otherwise the duration is 0, and the animation will not be played.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂