執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #myDIV { width: 300px; height: 200px; background: red url('smiley.gif') no-repeat top left/5px 5px; animation: mymove 5s infinite; } @keyframes mymove { 50% {background: blue bottom right/50px 50px;} } </style> </head> <body> <h1>Animation of background</h1> <p>Gradually change the background property:<p> <div id="myDIV"></div> <p>The background property is a shorthand property for all background properties.</p> <p>The background-color, background-position, and background-size properties are <em>animatable</em> in CSS.</p> </body> </html>