Bootstrap 表格边框在 Firefox 中无法正确显示。我在元素中创建了一个表,但它在 Firefox 中显示不正确。但 Chrome 没问题。
#product-attribute-specs-table th {border-bottom: medium none;border-radius: 0;border-right: medium none;box-shadow: none;color: #333333;display: block;font-size: 100%;font-weight: 600;line-height: 1.42857;text-align: left; }
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<table id="product-attribute-specs-table" class="data-table table table-striped">
<tbody>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr odd="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
<tr even="">
<th class="label ">Test 1</th>
<td class="data">Test 2</td>
</tr>
</tbody>
</table>
最佳答案
将 display: block
更改为 display: table-cell
。
CSS:
#product-attribute-specs-table th {
border-bottom: medium none;
border-radius: 0;
border-right: medium none;
box-shadow: none;
color: #333333;
display: table-cell;
font-size: 100%;
font-weight: 600;
line-height: 1.42857;
text-align: left;
}
希望对你有帮助
享受 :)
关于html - Bootstrap 表格边框在 Firefox 中无法正确显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39387948/