【问题标题】:Bootstrap, table-stripped class for only specified columnsBootstrap,表条带类,仅适用于特定列
【发布时间】:2018-12-07 13:03:14
【问题描述】:

我只想将表格剥离类应用于我的 3 列。我总共有 5 个列,但其中 3 个需要被剥离。有什么想法吗?

例如,我只想将剥离的表格应用到下面的选定区域:

【问题讨论】:

    标签: bootstrap-table


    【解决方案1】:

    您可以使用style="background-color: white;" 覆盖第一个 td 元素

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <table class="table table-condensed table-striped">
        <thead>
          <tr>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>Email</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td style="background-color: white;">John</td>
            <td>Doe</td>
            <td>john@example.com</td>
          </tr>
          <tr>
            <td>Mary</td>
            <td>Moe</td>
            <td>mary@example.com</td>
          </tr>
          <tr>
            <td style="background-color: white;">July</td>
            <td>Dooley</td>
            <td>july@example.com</td>
          </tr>
        </tbody>
      </table>
    </div>

    【讨论】:

    • 感谢您的解决方案,我知道了。
    猜你喜欢
    • 2013-05-06
    • 2018-09-28
    • 1970-01-01
    • 1970-01-01
    • 2018-06-12
    • 2019-08-24
    • 2015-12-25
    • 1970-01-01
    • 2022-08-03
    相关资源
    最近更新 更多