小编Tim*_*Guo的帖子

如何在表的某些列之间添加间距?

我想做一个这样的表: 意

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)

html css html-table spacing twitter-bootstrap

5
推荐指数
1
解决办法
5244
查看次数

标签 统计

css ×1

html ×1

html-table ×1

spacing ×1

twitter-bootstrap ×1