新手在这里!我期待为本网站调整一些代码:http://www.lakeofstars.org如何在页脚中居中放置图像
页面底部的页脚区域包含一系列徽标。理想的做法是确保页脚中的徽标图像在移动设备上正确显示(如果它们太大,某些徽标会下降到指定页脚背景下方),而且还会让它们在桌面上正确居中 - 我们会看到,他们目前在左边轻推。
下面的代码,因为它主张:
#footer {
position:absolute;
bottom:0;
width:100%;
height:140px; /* Height of the footer */
background:#ffffff;
border-top: solid 3px #ffc600;
background-image:url(img/global/footer.gif);
background-repeat: repeat-x;
background-position:bottom;
}
#footer .structure {
height: 140px;
width: 94%;
}
#footer .structure li {
display: inline-block;
margin: 10px 10px 0 0;
float: left;
}
#footer .structure li img {
height: 65px;
width: auto;
}