如何从行中删除行?

时间:2019-04-06 10:01:43

标签: css html-table bootstrap-4

如何从表格行中删除行?见下文:

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
  <br /><br /><br />
  <table class="table">
    <tbody>
      <tr style="text-align: center;">
        <td>Quantity</td>
        <td>Buy</td>
      </tr>
      <tr>
        <td><input type="number" class="form-control" id="quantity" placeholder="Quantity" name="quantity"></td>
        <td><input type="number" class="form-control" id="buy" placeholder="Buy Amount" name="buy"></td>
      </tr>
    </tbody>
  </table>
</div>

如何从表格行中删除行?见上文

1 个答案:

答案 0 :(得分:0)

使用table-borderless类标记table。参考here

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
  <br /><br /><br />
  <table class="table table-borderless">
    <tbody>
      <tr style="text-align: center;" class="">
        <td>Quantity</td>
        <td>Buy</td>
      </tr>
      <tr>
        <td><input type="number" class="form-control" id="quantity" placeholder="Quantity" name="quantity"></td>
        <td><input type="number" class="form-control" id="buy" placeholder="Buy Amount" name="buy"></td>
      </tr>
    </tbody>
  </table>
</div>