2011-01-27 61 views

回答

3
<table border="1"> 
    <tr> 
    <td colspan="2">&nbsp;</td> 
    <td rowspan="2">&nbsp;</td> 
    </tr> 
    <tr> 
    <td rowspan="2">&nbsp;</td> 
    <td>&nbsp;</td> 
    </tr> 
    <tr> 
    <td colspan="2">&nbsp;</td> 
    </tr> 
</table> 
1

使用colspan和rowspan,並設置高度和寬度。

<table border=1 height=400 width=400> 
    <tr> 
    <td colspan=2>1</td> 
    <td rowspan=2>3</td> 
    </tr> 
    <tr> 
    <td rowspan=2>4</td> 
    <td>5</td> 
    </tr> 
    <tr> 
    <td colspan=2>8</td>  
    </tr> 
    </table> 
0

這可以很容易地與rowspanscolspans來完成。

2

試試這個:-)

<table> 
    <tr> 
     <td colspan=2>top left</td> 
     <td rowspan=2>top right</td> 
    </tr> 
    <tr> 
     <td rowspan=2>lower left</td> 
     <td>center</td> 
    </tr> 
    <tr> 
     <td colspan=2>lower right</td> 
    </tr> 
</table> 

它產生

enter image description here

+2

下面是一個寬度設置的JSFiddle:http://jsfiddle.net/ep2Gw/ – 2011-01-27 14:24:06

+0

酷!從來沒有見過該網站:) – aioobe 2011-01-27 14:26:33

1

http://jsfiddle.net/2b9K3/

<table> 
    <tr> 
     <td colspan="2"></td> 
     <td rowspan="2"></td> 
    </tr> 

    <tr> 
     <td rowspan="2"></td> 
     <td></td> 
    </tr> 

    <tr> 
     <td colspan="2"></td> 
    </tr> 
</table> 
相關問題