我想做一个这样的表:
C和D,D和E以及F和G之间应该有间距.但是任何其他列之间不应该有任何空格,例如A和B.
这就是我目前拥有的:
JSFiddle:https://jsfiddle.net/e33cbkh3/1/
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css');
thead {
background: orange;
}
th, td {
text-align: center;
border: none !important;
}
Run Code Online (Sandbox Code Playgroud)
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th colspan="3"></th>
<th></th>
<th colspan="2"> XYZ </th>
<th></th>
</tr>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
<th>E</th>
<th>F</th>
<th>G</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)