运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: red; position: relative; animation: mymove 3s; animation-delay: 2s; animation-fill-mode: backwards; } @keyframes mymove { from {top: 0px; background-color: yellow;} to {top: 200px;} } </style> </head> <body> <h1>animation-fill-mode: backwards</h1> <p>Let the div element get the style values set by the first keyframe before the animation starts (during the animation-delay period):</p> <div></div> </body> </html>