运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <head> <style> #parentDIV { position: relative; height:300px; width: 60%; background-color:#FFFFFF; border: solid black 1px; } #myDIV { position: absolute; background-color:lightblue; height: 100%; inset-inline: 10px 30px; animation: mymove 5s infinite; } @keyframes mymove { 50% {inset-inline: 40px 100px;} } </style> </head> <body> <h1>Animation of inset-inline</h1> <p>Gradually change the inset-inline property from 10px 30px to 40px 100px, and back to 10px 30px:<p> <div id="parentDIV"> <div id="myDIV"> This is my DIV element. </div> </div> </body> </html>