【发布时间】:2018-06-21 04:50:08
【问题描述】:
我的 HTML 在奇数两个内有一个表格
我想要这个
但我有这个
我怎样才能用同样的方式做表 td ?
这是我的 HTML 代码:
<table>
<thead class='thead-dark'>
<tr>
<th>Semestre</th>
<th>Curso</th>
<th>Seccion</th>
</tr>
</thead>
<tbody>
{% for item in results%}
<tr>
<td>{{item.year}}</td>
<td><table class="table table-striped table-hover">
{% if item.A!= ""%}
<tr><td><p>A.1</p></td></tr>
{%endif%}
{% if item.B != ""%}
<tr><td><p>B.1</p></td></tr>
{%endif%}
</tr></table></td>
<td><table>
{% if item.A != ""%}
<tr><td><p>{{item.A|linebreaks}}</p></td></tr>
{%endif%}
{% if item.B != ""%}
<tr><td><p>{{item.B|linebreaks}}</p></td></tr>
{%endif%}
</tr></table></td>
</tr>
</tbody>
</table>
【问题讨论】:
-
不起作用。当我在
标签中添加 rowspan 时,它会生成 B,放在 A 旁边
标签: html html-table