如何在表上删除此行

时间:2016-06-11 14:42:53

标签: html css twitter-bootstrap twitter-bootstrap-3

我需要使用thead删除此表中tbodybootstrap3之间的一行 我试过css但没有成功

我尝试删除border并折叠table但我得到了这个

Error

<table class="table">
    <thead>
    <tr>
        <th>Atividade:</th>
        <th>Meta:</th>
        <th>Responsável</th>
        <th>Parceria:</th>
        <th></th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>
            <input type="text" class="form-control" name="NomeAtividade[]" required="">
        </td>        
        <td>
           <input type="number" min="0" max="100" step="1" value="0"  class="form-control" id="MetaAtividade" name="MetaAtividade[]">
        </td>        
        <td>
            <input type="text" class="form-control" name="ResponsavelAtividade[]">
        </td>
        <td>
            <input type="text" class="form-control" name="ParceiroAtividade[]">
        </td>
        <td>
            <button type="button" class="btn btn-default addButton"><i class="glyphicon glyphicon-plus"></i></button>
        </td>

    </tr>
</tbody>

1 个答案:

答案 0 :(得分:2)

它来自Bootstrap.css,您必须在2个元素中设置border:0,请参阅下面的代码段,

仅将!important用于演示

.table {
  background: darkgreen
}
.table > tbody > tr > td,
.table > thead > tr > th {
  border: 0 !important
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<table class="table">
  <thead>
    <tr>
      <th>Atividade:</th>
      <th>Meta:</th>
      <th>Responsável</th>
      <th>Parceria:</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <input type="text" class="form-control" name="NomeAtividade[]" required="">
      </td>
      <td>
        <input type="number" min="0" max="100" step="1" value="0" class="form-control" id="MetaAtividade" name="MetaAtividade[]">
      </td>
      <td>
        <input type="text" class="form-control" name="ResponsavelAtividade[]">
      </td>
      <td>
        <input type="text" class="form-control" name="ParceiroAtividade[]">
      </td>
      <td>
        <button type="button" class="btn btn-default addButton"><i class="glyphicon glyphicon-plus"></i>
        </button>
      </td>

    </tr>
  </tbody>