rowspan和colspan
1.说明
rowspan:跨行
colspan:跨列
用于设计复杂的表格
2.例子
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <style> table, tr, td{ border:2px solid pink; border-collapse:collapse; } td{ width:200px; height:60px; } </style> </head> <body> <table> <tr> <td colspan="2"></td> <td rowspan="2"></td> </tr> <tr> <td rowspan="2"></td> <td></td> </tr> <tr> <td></td> <td></td> </tr> </table> </body> </html>
输出结果: