出于某种原因,页脚仅在这一页的一半处停留,但其他所有似乎都还可以。找了好久也找不到原因。
我已将相关的 HTML 和 CSS 放在下面,显然还有更多可用的内容。
HTML:
<div class="alt-contact">
<p>Prefer manual contacting? <a href="mailto:me@example">Email me.</a></p>
</div>
</div> <!-- This div corresponds to the content wrapper div above -->
<div class="footer-wrapper">
<div class="footer">
<p class="copyright">Copyright © 2012 Christian Selig</p>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
CSS:
.footer-wrapper {
background: #f7f7f7; /* Old browsers */
background: -moz-linear-gradient(top, #f7f7f7 0%, #d6d6d6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#d6d6d6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f7f7f7 0%,#d6d6d6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f7f7f7 0%,#d6d6d6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f7f7f7 0%,#d6d6d6 100%); /* IE10+ */
background: linear-gradient(to bottom, #f7f7f7 0%,#d6d6d6 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#d6d6d6',GradientType=0 ); /* IE6-9 */
border-top: 1px solid #ccc;
bottom: 0;
height: 16px;
overflow: hidden;
padding: 8px 0 5px 0;
position: absolute;
width: 100%;
}
.footer {
color: #808080;
clear: both;
font-family: 'Lucida Grande', Helvetica, Arial, sans-serif;
font-size: 0.7em;
margin: auto;
width: 900px;
}