以下是我的页脚部分的HTML代码:
<footer>
<div class="footer">
<nav>
<ul class="nav-list1">
<li><img src="img/article-logo.png" alt="img"/></li>
</ul>
<ul class="nav-list2">
<li>ABOUT</li>
<li>AUTHOURS</li>
</ul>
</nav>
<hr class="hr-style" />
<section class="footer-column">
<div class="footer-column1">
<img src="img/dot-net-ad.jpg" class="footer-image" alt="dot"/>
<p class="footer-title">.NET Training</p>
<p class="footer-pgf">If you have a .NET question on a topic that 's not covered by other more specific forums.</p>
<a class="footer-link" href="#">ask here. ></a>
</div>
<div class="footer-column2">
<img src="img/shopify-expert-ad.jpg" class="footer-image" alt="expert"/>
<p class="footer-title">Shopify Expert</p>
</div>
</section>
<hr class="hr-style" />
<p class="copyright">Copyright © 2013 Dot Net How</p>
</div>
</footer>
并且,这是我的页脚样式:
nav {
text-align : center;
}
.footer {
background-image : url('../img/footer-bg.jpg');
bottom : 0;
height : auto;
}
我的错误是什么,需要使用什么属性?
答案 0 :(得分:0)
根据照片高度使用padding-top
:
.footer {
background:url(img/footer-bg.jpg) top center no-repeat;
padding-top:100px;
}