我已經完成了這一百萬次,但我無法弄清楚爲什麼現在不行。我試圖讓4張相同大小的圖像水平地坐在一條直線上,但是它們彼此之間呈現出略微的對角線。CSS內聯塊圖像不會水平對齊
這裏是我的html
<div class="homepage_images">
<a href="http://one-event.org.uk/the-event/activities/for-18s-under/"><img src="http://one-event.org.uk/wp-content/uploads/2013/12/CHILDREN.jpg" alt="" width="300" height="228" class="alignnone size-full wp-image-182" /></a>
<a href="http://one-event.org.uk/the-event/activities/"><img src="http://one-event.org.uk/wp-content/uploads/2013/12/ACTIVITIES-COVER.jpg" alt="ONE 2014 WEBSITE REV2" width="300" height="228" class="alignnone size-full wp-image-181" /></a>
<a href="http://one-event.org.uk/the-event/streams/"><img src="http://one-event.org.uk/wp-content/uploads/2013/12/STREAMS-COVER.jpg" alt="ONE 2014 WEBSITE REV2" width="300" height="228" class="alignnone size-full wp-image-184" /></a>
<a href="http://one-event.org.uk/the-event/speakers/"><img src="http://one-event.org.uk/wp-content/uploads/2013/12/SPEAKERS-COVER.jpg" alt="ONE 2014 WEBSITE REV2" width="300" height="228" class="alignnone size-full wp-image-183" /></a>
</div>
我的CSS:
.homepage_images {
display:block;
}
.homepage_images img{
display:inline-block;
float:left;
width:240px;
opacity:0.8;
}
這裏是該網站的鏈接,未對齊的圖像是附近的頁面 http://www.one-event.org.uk
底部
您在問題中發佈的代碼與實際網站上的代碼不匹配。 – EyalAr