2010-12-09 26 views

回答

1

上所有的人都加入display: block,他們會像資料覈實,並對齊像你默認希望他們。

一個簡單的例子:

<!DOCTYPE html> 
<html> 
<body> 
<style> 
    img.block{ 
     display: block; 
    } 
</style> 
<img class="block" src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" alt="Google logo" /> 
<img class="block" src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" alt="Google logo" /> 
<img class="block" src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" alt="Google logo" /> 
<img class="block" src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" alt="Google logo" /> 
</body> 
0

實施例?你有我們可以看的URL嗎?我的意思是,這可以很容易地完成,這一切都取決於你需要做什麼。

-1

這將是最簡單和最快的。 (不是最好的方法)

<h4>This table has no borders:</h4> 
<table> 
<tr> 
    <td>image.gif</td> 
</tr> 
<tr> 
    <td>image.gif</td> 
</tr> 
<tr> 
    <td>image.gif</td> 
</tr> 
<tr> 
    <td>image.gif</td> 
</tr> 
</table> 

http://www.w3schools.com/html/html_tables.asp

+0

絕對不是最好的!順便說一句,我不是。 – AUSteve 2010-12-10 03:00:59

+1

表...他們永遠不會死。 – 2010-12-10 06:37:02

0

下面的CSS應該這樣做

display: block; float: left; clear: both;