【问题标题】:How do you put divs or spans in the middle of table rows?如何将 div 或 span 放在表格行的中间?
【发布时间】:2019-02-03 17:56:51
【问题描述】:

每次我渲染 HTML 时,div 都会被推出表格。

获得与 div 相同的行为的正确方法是什么?我正在尝试使用 jQuery 隐藏表的块。

【问题讨论】:

  • 暂时忘记关注 html div 元素。你想达到什么目的?如果您使用的东西对您不起作用,则很可能是错误的工具(元素)。
  • 行中间是什么意思?你能告诉我们代码吗?
  • 您是否考虑过使用两个表格,表格之间有 div?

标签: html html-table


【解决方案1】:

遵循此格式:

<table width="200" border="1">
<tr id="1">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr id="2">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
 </tr>
<DIV>EXPANDING UPON ROW 2 AT BLOCK LEVEL But UN-effecting ROW 1 AND 3</DIV>
<tr id="3">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

【讨论】:

    猜你喜欢
    • 2019-07-13
    • 2012-09-13
    • 1970-01-01
    • 2021-11-30
    • 2021-10-16
    • 2022-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多