Date: February 26th, 2010
Cate: html
Tags: ,  

<img>圖片標籤接不起來的問題




<img>接不起來、多空一條(橫排)1

Why

-斷行視為有空格

<img src="http://www.uwinfo.com.tw/images/Title.JPG"/>
<img src="http://www.uwinfo.com.tw/images/Title.JPG"/>
<img src="http://www.uwinfo.com.tw/images/Title.JPG"/>

標籤右邊視為有空格

<img>接不起來、多空一條(直列)2

Why

-斷行視為空格(只出現IE6‧7)

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="xxx.JPG"/> </td>
</tr>
<tr>
<td><img src="xxx.JPG"/></td>
</tr>
<tr>
<td><img src="xxx.JPG"/></td>
</tr>
<tr>
<td></td>
</tr>
</table>

程式碼紅色地方視為空格

原因:<img>標籤在"原始碼"的"空白"視為像 &nbsp; 的空格,產生區塊,造成圖片有間隔。為了應應各版本,盡量用CSS取代或<img>標籤要接在一起,前後不要有空隔,才不會遇到這種鳥問題。


Leave a Reply

 Name

 Mail

 Home

[Name and Mail is required. Mail won't be published.]