【发布时间】:2021-12-18 05:12:49
【问题描述】:
我正在尝试使用 Magento 中的 HTML 代码元素创建一个表格。我曾尝试使用响应式媒体类型,但它仍在移动设备上超出屏幕范围。
Magento Responsive Table Mobile
<style>
.table {
width: 100%;
border-collapse: collapse;
}
tbody tr:nth-child(odd) {
background-color: #f2f2f2;
}
.responsive-table {
overflow-x: auto;
}
</style>
<body>
<table>
<thead>
<tr>
<th>Variant</th>
<th>ETA-approval</th>
<th>Drill diameter</th>
<th>Min. drill hole depth</th>
<th>Effect. anchorage depth</th>
</tr>
</thead>
<tbody>
<tr>
<td>FIS H 12 x 50 K</td>
<td>Yes</td>
<td>12 [mm]</td>
<td>60 [mm]</td>
<td>50 [mm]</td>
</tr>
<tr>
<td>FIS H 12 x 85 K</td>
<td>Yes</td>
<td>12 [mm]</td>
<td>95 [mm]</td>
<td>85 [mm]</td>
</tr>
<tr>
<td>FIS H 16 x 85 K</td>
<td>Yes</td>
<td>16 [mm]</td>
<td>95 [mm]</td>
<td>85 [mm]</td>
</tr>
</tbody>
</table>
</body>
【问题讨论】: