标签: html css image alignment
<img src="abroad.jpg" alt="country" width="495" height="262.5"> <img src="bubbles.jpg" alt="colourful" width="495" height="262.5"> <img src="butterflies.jpg" alt="nature" width="495" height="262.5">
对于此代码,如何对齐所有图像,使它们位于页面的中央而不是左侧?
答案 0 :(得分:1)
尝试
img { display: block; margin: 0 auto; }
http://jsfiddle.net/5dT66/