简体   繁体   English

如何删除bootstrap 3.0表格中的下边框?

[英]How do I remove the bottom border on a bootstrap 3.0 table thead?

I have a new project I'm working on, and I'm using Bootstrap 3.0. 我有一个我正在研究的新项目,我正在使用Bootstrap 3.0。

I have a table with class "table" (and no more), it has a thead and tbody in it's DOM. 我有一个表“class”(并没有),它有一个thead和tbody在它的DOM中。 There aren't any borders in the tbody, but in the thead there is a small white (or nearly white) border that, for the life of me, I cannot get to go away. tbody中没有任何边框,但是在thead中有一个小的白色(或接近白色)边框,在我的生命中,我无法消失。

Here is the website where the table is located: http://majornoob.com/dev/mcsr/ 这是该表所在的网站: http//majornoob.com/dev/mcsr/

If I can be of more assistance to helping in resolving my question, I'd be most happy to edit the post. 如果我可以帮助解决我的问题,我会非常乐意编辑这篇文章。

EDIT 编辑

Here is my modified version of the accepted answer, as I'm just removing the borders and am not modifying anything else: 这是我接受的答案的修改版本,因为我只是删除边框而不是修改其他任何内容:

.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{border:none;}

Yes you can remove this border: 是的,您可以删除此边框:

In css file you can see : css文件中,您可以看到:

In bootstrap you have following CSS For set border-bottom on table head elements: 在bootstrap中你有以下CSS用于表头元素的set border-bottom

.table thead>tr>th {
   vertical-align: bottom;
   border-bottom: 2px solid hsl(0, 0%, 87%);
}

And following CSS for set border-top on table row elements: 并遵循CSS在表行元素上设置border-top

.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{
   padding:8px;
   line-height:1.428571429;
   vertical-align:top;
   border-top:1px solid #ddd
}

By removing these two border style, you can easily get success and what you want. 通过删除这两种边框样式,您可以轻松获得成功和所需。

here is the border: 这是边界:

.table thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}

you can edit it as you like. 你可以随意编辑它。



update: 更新:

edit this class too: 编辑这个类:

.table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td {
padding: 8px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM