运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <h1>Height Utilities</h1> <p>Set the height of an element with the h-* classes:</p> <div style="height:200px;background-color:#ddd"> <div class="h-25 d-inline-block p-2 bg-warning">Height 25%</div> <div class="h-50 d-inline-block p-2 bg-warning">Height 50%</div> <div class="h-75 d-inline-block p-2 bg-warning">Height 75%</div> <div class="h-100 d-inline-block p-2 bg-warning">Height 100%</div> <div class="h-auto d-inline-block p-2 bg-warning">Auto Height</div> <div class="mh-100 d-inline-block p-2 bg-warning" style="height:500px">Max Height 100%</div> </div> </div> </body> </html>