Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 3 尝试删除引导3表中的水平线_Twitter Bootstrap 3_Html Table_Horizontal Line - Fatal编程技术网

Twitter bootstrap 3 尝试删除引导3表中的水平线

Twitter bootstrap 3 尝试删除引导3表中的水平线,twitter-bootstrap-3,html-table,horizontal-line,Twitter Bootstrap 3,Html Table,Horizontal Line,我在bootstrap中创建一个表,并试图找出如何删除每行顶部显示的边框 我正在重新创建Stack Overflow主页,为了练习,我正在制作一张最重要的问题表。我为每一实际行使用2个引导行。因为我使用2行显示为1,所以我需要隐藏第2行的上边框 我尝试了两种不同的CSS方法试图摆脱它,但都没有效果。下面显示了这两种格式以及html: <style> .2nd-line { border-top: none; } .borderless td, .borderless th

我在bootstrap中创建一个表,并试图找出如何删除每行顶部显示的边框

我正在重新创建Stack Overflow主页,为了练习,我正在制作一张最重要的问题表。我为每一实际行使用2个引导行。因为我使用2行显示为1,所以我需要隐藏第2行的上边框

我尝试了两种不同的CSS方法试图摆脱它,但都没有效果。下面显示了这两种格式以及html:

<style>

.2nd-line {
    border-top: none;
}

.borderless td, .borderless th {
    border: none;
}

</style>


<div class = "row-fluid"> <!-- begin row 1 -->
  <div class = "col-md-9">
    <div class = "panel-body">
      <table class="table borderless">
        <tr class="warning">
          <td>
            <div class = "col-md-1">
              <p class = "top-questions-stats">0</p>
            </div>
            <div class = "col-md-1">
              <p class = "top-questions-stats">1</p>
            </div>
            <div class = "col-md-1">
              <p class = "top-questions-stats">13</p>
            </div>
            <div class = "col-md-6">
              <a href = "http://stackoverflow.com/questions/33545349/clipping-the-required-portion-of-the-image-using-css" target = "blank"><h5>Clipping the required portion of the image using CSS</h5></a>
            </div>
          </td>
        </tr>
        <tr class="warning 2nd-line borderless">
          <td class = "2nd-line borderless">
            <div class = "col-md-1">
              <p class = "top-questions-stats">votes</p>
            </div>
            <div class = "col-md-1">
              <p class = "top-questions-stats">answer</p>
            </div>
            <div class = "col-md-1">
              <p class = "top-questions-stats">views</p>
            </div>
            <div class = "col-md-2">
              <p>tags</p>
            </div>
            <div class = "col-md-4">
              <p class = "asked">asked 29 secs ago Darryl Mendonez</p>
            </div>
          </td>
        </tr> <!-- end row 1 -->

.二线{
边界顶部:无;
}
.无边界td、.无边界th{
边界:无;
}

0

1

13

投票

回答

视图

标签

29秒前问过Darryl Mendonez


添加!第二种风格的重要属性

.borderless td, .borderless th {
    border: none !important;
}

这是如何做到这一点没有!重要标记。

在引导css后应用样式了吗?应该行。是的,我的自定义样式表总是最后一个。太好了。谢谢你的工作。有没有可能不用它!重要吗?我尽量不使用!尽可能重要。我没有测试过这两种方法,但是,您可以尝试在html元素上使用“内联”样式。或者,您可以直接修改引导样式,这可能不是推荐的方法。我可以尝试内联,尽管我尝试在自定义外部样式表中执行所有css。
.borderless > thead > tr > th,
.borderless > tbody > tr > th,
.borderless > tfoot > tr > th,
.borderless > thead > tr > td,
.borderless > tbody > tr > td,
.borderless > tfoot > tr > td {
  border-top: none;
}