<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
标签 html css materialize
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
在大屏幕上,我的表格 TH 位于顶部,但当我在移动设备上运行它时,这些 TH 位于左侧。这是 TH of tables 的默认行为吗?我正在使用“响应表”的 Matrialize css 类。
<table class="responsive-table">
<thead>
<tr>
<th data-field="id">Name</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alvin</td>
<td>Eclair</td>
<td>$0.87</td>
</tr>
<tr>
<td>Alan</td>
<td>Jellybean</td>
<td>$3.76</td>
</tr>
<tr>
<td>Jonathan</td>
<td>Lollipop</td>
<td>$7.00</td>
</tr>
</tbody>
</table>
最佳答案
是的,这是添加 responsive-table
类时的默认行为。文档指出:
Add class="responsive-table" to the table tag to make the table horizontally scrollable on smaller screen widths.
养成检查文档的习惯!我从未使用过物化,但我通过搜索他们的网站很快找到了答案。
关于html - th 表标签的默认行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37062305/