我有我的網站下面的代碼,我想在網頁居中圖像如何中心的鏈接一組圖片
<ul class="">
<a href="https://www.github.com">
<img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/github.png" border="0" alt="Code" class="">
</a>
<a href="http://www.linkedin.com">
<img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/linkedin.png" border="0" alt="Connect" class="">
</a>
<a href="https://www.twitter.com">
<img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/twitter.png" border="0" alt="Twitter">
</a>
</ul>
我也有下面的CSS:
a{
color:black;
text-decoration: none;
margin: 0px auto;
width: 400px;
}
ul{
padding: 0;
}
我需要做什麼才能將我的網站上的所有三個圖像鏈接居中?
謝謝!這工作。另一個快速問題,我將如何添加一些垂直填充圖像? – user2604504
@ user2604504使用'padding:10px 0;'爲圖像 –