【发布时间】:2015-03-15 03:12:53
【问题描述】:
我有一个 aspx 页面,其中内容较少,因为我的“页脚”没有粘在底部。
请找到相应的 html 代码
<div style=" background: #eae8e7;
border-top: #d30000 4px solid;
min-height: 80px;
position: relative;
right: 0px;
bottom: 1px;
left: 0px;
margin-right: auto;
margin-left: auto;">
请找到我使用的css:
.footer {
width: 100%;
padding: 0 0;
margin: 0 auto;
background: #eae8e7;
border-top: #d30000 4px solid;
bottom: 0px;
position: inherit;
clear: both;
}
【问题讨论】:
-
如果您只想使用 CSS 而不使用
position:fixed,那么这就是您需要的 ryanfait.com/sticky-footer -
@wf4:不是这样的,你可以提出任何方法来实现它
-
将
min-height设置为容器 -
请你建议我如何定义
-
如果我的回答不是你想要的就告诉我