1、html标签
将html显示高度占满(class="h-100")。
<html lang="en" class="h-100">
2、body标签
设置body弹性布局,并将高度占满(class="d-flex flex-column h-100")。
<body class="d-flex flex-column h-100">
3、main标签
将main设置为不同的屏幕设备不设置收缩(role="main" class="flex-shrink-0")。
<main role="main" class="flex-shrink-0">
弹性收缩规则:
4、footer标签
设置footer顶部边框高度自动设置(class="mt-auto")。
<footer class="footer mt-auto py-3">
原文:https://www.cnblogs.com/xhubobo/p/14480703.html