我在我的项目中使用页脚。我正在使用 c#.net mvc。
我插入页脚。但我有问题。
当正文具有低内容意味着,页脚上升。即在正文内容下方。如果正文包含低内容,我希望页脚固定在页面底部。
我怎样才能实现它?
.footer {
background: none repeat scroll 0 0 white;
border-top: 1px solid #e7eaec;
bottom: 0;
left: 0;
padding: 10px 20px;
position: absolute;
right: 0;
}
<div class="footer">
Bottom Page
</div>
您可以使用来自 CSS3 的新属性和值。
例如 :
<body>
<div class="container"></div>
<div class="footer"></div>
</body>
对于 CSS :
.container {
min-height: 90vh;
}
.footer {
height: 10vh;
}
这样,即使您的容器为空,您的页脚也将始终位于底部
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句