html 制作复杂table
生活随笔
收集整理的這篇文章主要介紹了
html 制作复杂table
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
數(shù)據(jù)分析,一般都需要顯示數(shù)據(jù),就需要使用html做復(fù)雜的表格。復(fù)雜表格一般是對td的rowspan 、colspan屬性值。
在html中<td> 標(biāo)簽定義 HTML 表格中的標(biāo)準(zhǔn)單元格。
(1)rowspan 屬性規(guī)定單元格可橫跨的行數(shù);
(2)colspan 屬性規(guī)定單元格可橫跨的列數(shù)。
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5 <title>復(fù)雜表格</title> 6 </head> 7 <body> 8 <center> 9 <table width = "20%" border="1"> 10 <tr> 11 <th>網(wǎng)站</th> 12 <th colspan="2">統(tǒng)計情況</th> <!-- colspan="2" 占位,表示這一列占2列 --> 13 </tr> 14 <tr> 15 <td rowspan="3">奇虎360</td> <!-- rowspan="2" 占位,表示這一列占3行 --> 16 <td>http://hao.360.cn/</td> 17 <td>11</td> 18 </tr> 19 <tr> 20 <td>http://sh.qihoo.com/</td> 21 <td>22</td> 22 </tr> 23 <tr> 24 <td>http://video.so.com/</td> 25 <td>33</td> 26 </tr> 27 </table> 28 </center> 29 </body> 30 </html>顯示:
?
rowspan 、colspan 可以理解為占位。占行數(shù)、列數(shù)。
轉(zhuǎn)載于:https://www.cnblogs.com/xudong-bupt/p/3950586.html
總結(jié)
以上是生活随笔為你收集整理的html 制作复杂table的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 内存管理高级知识点
- 下一篇: (转)Oracle 临时表用法