小编eri*_*gel的帖子

Bootstrap 5 中垂直居中的 div

如何在 Bootstrap 5 中垂直居中?\n它应该在和屏幕结束div之前的内容之间的中间对齐。div

\n

尝试过这个:

\n
    <div>some content</div>\n    <div class="d-flex flex-column min-vh-100 justify-content-center align-items-center">\n        <div>div that should be centered</div>\n    </div>\n
Run Code Online (Sandbox Code Playgroud)\n

它使页面比实际长度长。div\xc2\xb4t 看起来不居中。

\n

html css bootstrap-5

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

bootstrap-5 ×1

css ×1

html ×1