兩個table表格在DIV內居中,並且不換行
阿新 • • 發佈:2019-02-13
<div style="width:940px;margin-left:auto; margin-right:auto;">
<div style="background:red;width:120px;height:194px;display:inline;">
<table border="1" style="display:inline;">
<tr>
<th>fdfdfa</th>
<th>adadf</th>
</tr>
<tr>
<td>2324</td>
<td>4343</td>
</tr>
</table>
</div>
<div style="background:blue;width:120px;height:194px;display:inline;">
<table border="1" style="display:inline;">
<tr>
<th>fdfdfa</th>
<th>adadf</th>
</tr>
<tr>
<td>2324</td>
<td>4343</td>
</tr>
</table>
</div>
</div>
<div style="background:red;width:120px;height:194px;display:inline;">
<table border="1" style="display:inline;">
<tr>
<th>fdfdfa</th>
<th>adadf</th>
</tr>
<tr>
<td>2324</td>
<td>4343</td>
</tr>
</table>
</div>
<div style="background:blue;width:120px;height:194px;display:inline;">
<table border="1" style="display:inline;">
<tr>
<th>fdfdfa</th>
<th>adadf</th>
</tr>
<tr>
<td>2324</td>
<td>4343</td>
</tr>
</table>
</div>
</div>