[英]Div in the bottom of the screen
您可以使用vh
單元執行此操作。
body, html { height: 1000px; margin: 0; } div { position: relative; width: 100px; height: 100px; background: tan; top: calc(100vh - 100px); }
<div></div>
嘗試將此css添加到您的ID或類:
div {
position: absolute;
bottom: 0;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.