今天做一個大的頁面,主要是對table布局的理解:
代碼:
<table cellspacing=0 border=1 style="bordercolor:#C0C0C0;" align="center" width="100%">
<tr align="center" style="background:#628FC3"><td colspan="5" height="100px" width="100%" >頁首</td></tr>
<tr align="center" style="background:#CBDAEB"><td height="30px" width="20%">標題1</td><td width="20%">標題2</td><td width="20%">標題3</td><td width="20%">標題4</td><td width="20%">標題5</td></tr>
<tr align="center"><td height="300px" style="background:#92D050">側導航欄</td><td colspan="4" style="background:#00B0F0">主頁內容</td></tr>
<tr align="center"><td height="50px" colspan="5" style="background:#FFC000">頁尾</td></tr>
</table>
效果:
這里需要用到一個取色工具FSCapture,還有對布局的美感掌控。