[英]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.