运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #DIV1 { width: 200px; height: 200px; padding: 10px; margin: auto; border: 1px solid black; } #DIV2 { height: 100px; width: 100px; border: 1px solid black; background-color: red; rotate: 1 1 0 60deg; } #DIV2original { position: absolute; width: 100px; height: 100px; border: 1px dashed grey; background-color: lightgrey; opacity: 0.5; } </style> </head> <body> <h3>Rotate property</h3> <p>Changes the rotation of the red box. "1 1 0" creates vector [1 1 0] in the 2D plane with x- and y-coordinates, then rotates 60 degrees around that vector.</p> <div id="DIV1">DIV1 <div id="DIV2original">DIV2</div> <div id="DIV2">DIV2</div> </div> </body> </html>