colspan
?
<table>
? ? ? ? ?<tr>
? ? ? ? ? ? <td>用戶名:</td>
? ? ? ? ? ? <td><input type="text" name="username"></td>
? ? ? ? ?</tr>
? ? ? ? ?<tr>
? ? ? ? ? ? <td>密碼:</td>
? ? ? ? ? ? <td><input type="password" name="password"></td>
? ? ? ? ?</tr>
? ? ? ? ?<tr>
? ? ? ? ? ? <td colspan="2"><input type="submit" value="登錄"></td>
? ? ? ? ?</tr>
? ? ? ? </table>
?colspan="2"是合并那兩列呢????????
2015-10-22
colspan是合并了兩個橫著的單元格 就是合并了兩個在同一個tr里的td。
也就是第三行只有一個大的單元格
類似這種,建議前臺學習可以下載一個 editplus , 創建html文件,寫代碼的同時可以預覽樣式
希望能夠幫到你
2015-10-22
你把代碼展示出來就一目了然了,它是把最后的tr合并成了一列。