jquery - 块内的 DIV
问题描述
我想在块结束后在<div></div>
块内添加一个块。但它转移到上表。例如,我想这样做。<tr>
<td>
<table class="table">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
<th>Header 4</th>
</tr>
<tr>
<td>Info 1</td>
<td>Info 2</td>
<td>Info 3</td>
<td>Info 4</td>
<div class="progressInfo">
<div class="progressBar">A horizontal plane progress bar here stating the completion of the work done.</div>
<div class="textStatus">209133 left 444444 teams</div>
</div>
</tr>
</table>
但<div></div>
转移到了榜首。我有什么办法可以做到这一点?另外,我正在使用引导程序。
CSS
.table>tbody>tr>td,
.table>tbody>tr>th,
.table>tfoot>tr>td,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>thead>tr>th {
vertical-align: middle;
border-top: 1px solid #eee
}
解决方案
你需要创建一个新行<tr>
并添加colspan="4"
到 td
.table {
border-collapse: collapse;
}
.table>tbody>tr
{
vertical-align: middle;
border-bottom: 1px solid red;
}
<table class="table">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
<th>Header 4</th>
</tr>
<tr>
<td>Info 1</td>
<td>Info 2</td>
<td>Info 3</td>
<td>Info 4</td>
</tr>
<tr>
<td colspan="4">
<div class="progressInfo">
<div class="progressBar">A horizontal plane progress bar here stating the completion of the work done.</div>
<div class="textStatus">209133 left 444444 teams</div>
</div>
</td>
</tr>
<tr>
<td>Info 1</td>
<td>Info 2</td>
<td>Info 3</td>
<td>Info 4</td>
</tr>
<tr>
<td colspan="4">
<div class="progressInfo">
<div class="progressBar">A horizontal plane progress bar here stating the completion of the work done.</div>
<div class="textStatus">209133 left 444444 teams</div>
</div>
</td>
</tr>
</table>
推荐阅读
- powerbi - 为什么 PowerBI 从 Microsoft Access 数据库中获取数据时显示“此表为空”?
- java - 如何使用 Float[] 的 PointerByReference 参数调用函数?
- android - 来自应用程序的 R 类中未包含的某些库模块的字符串
- node.js - 如何在 Mac 上的 Dropbox 中递归地忽略 node_modules
- python - txt文件中的Python编号段落
- python - xlsx 工作表上的 NLP - 单列
- javascript - vue - 切换状态时变换旋转不会旋转回来
- c# - 我如何更改 Microsoft.ReportViewer.WinForms 中的报告显示
- python - 为什么我的代码将小数检测为不是数值
- javascript - 使用 Jest 和测试库测试元素是否至少聚焦一次