运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 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; scale: 2 50%; } #DIV2original { position: absolute; width: 100px; height: 100px; border: 1px dashed grey; background-color: lightgrey; opacity: 0.5; } </style> </head> <body> <h3>Scale property</h3> <p>Changes the size of the red box. Scales red box so that it becomes double in size (factor 2) on x-axis and half the size (50%) on y-axis.</p> <div id="DIV1">DIV1 <div id="DIV2original">DIV2</div> <div id="DIV2">DIV2</div> </div> </body> </html>