运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { background-color: red; width: 100px; aspect-ratio: 3/2; } </style> </head> <body> <h3>Aspect-ratio property</h3> <div>Hello</div> <p>Aspect ratio is width/height.</p> <p>Aspect-ratio of 3/2 and width set to 100px makes height of red box 2/3 of width in this case.</p> </body> </html>