【发布时间】:2020-07-21 19:45:21
【问题描述】:
我使用的是 bootstrap 4.5,但这只是我想要的一个简单示例。
我有一张固定宽度和高度的卡片,我希望内容占据所有剩余空间,而按钮始终位于底部。我怎样才能做到这一点?
<html>
<body>
<div style="width:400px; height:704px; background-color:gray;">
<div class="container" style="width:100%; height:100%;">
Some content
<button>Some Button</button>
</div>
</div>
</body>
</html>
【问题讨论】:
-
stackoverflow.com/questions/2147303/… 是不是同样的问题?
-
您是在寻找要在引导程序中还是仅在 HTML 和 CSS 中的代码?
-
@MithunDas 我在下面的回答中引用了这篇文章
标签: html css twitter-bootstrap bootstrap-4