We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第125天 举例说明table怎么合并行和列的?
The text was updated successfully, but these errors were encountered:
多条信息中同一类别(例学生的班级),纵向合并table表格单元格 rowspan属性用在td标签中,用来指定单元格纵向跨越的行数,可以理解为是占了多少位置而不是合并了多少个格子。被占了位置的那一条信息就不用再加同类别td了。 多类别想放到同一格里(例学生的姓名、年龄要放到同一格子),横向合并table表格单元格 colspan属性用在td标签中,用来指定单元格横向跨越的列数
Sorry, something went wrong.
跨行合并:rowspan 跨列合并:colspan
合并单元格的思想:
将多个内容合并的时候,就会有多余的东西,把它删除。 例如 把 3个 td 合并成一个, 那就多余了2个,需要删除。
公式: 删除的个数 = 合并的个数 - 1
<!DOCTYPE HTML> <HTML lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <table width="400" height="100" border="1"> <tr> <td>123</td> <td>abc</td> <td>abc</td> </tr> <tr> <td colspan="2">123</td> <td>测试</td> </tr> <tr> <td>123</td> <td>abc</td> <td>abc</td> </tr> </table> 1. 先确认跨列合并 colspan 2. 先上后下 先左右后 3. 删除的个数 <table width="400" height="100" border="1"> <tr> <td>123</td> <td>abc</td> <td rowspan="3">abc</td> </tr> <tr> <td>123</td> <td>123</td> </tr> <tr> <td>123</td> <td>abc</td> </tr> </table> 1. 先确认跨行合并 rowspan 2. 先上后下 先左右后 3. 删除的个数 </body> </HTML>
No branches or pull requests
第125天 举例说明table怎么合并行和列的?
The text was updated successfully, but these errors were encountered: