我有一个正在处理的新元素,我正在使用 Bootstrap 3.0。
我有一个类为“table”的表(仅此而已),它的 DOM 中有一个 thead 和 tbody。 tbody 中没有任何边框,但在 thead 中有一个白色(或接近白色)的小边框,对于我来说,我无法摆脱它。
这是表格所在的网站: http://majornoob.com/dev/mcsr/
如果我能提供更多帮助来帮助解决我的问题,我将非常乐意编辑帖子。
编辑
这是我对已接受答案的修改版本,因为我只是删除了边框,没有修改任何其他内容:
.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;}
最佳答案
是的,你可以删除这个边框:
在 css
文件中你可以看到:
在 bootstrap 中,你有以下 CSS For set border-bottom
on table head elements:
.table thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid hsl(0, 0%, 87%);
}
然后在表格行元素上设置 border-top
的 CSS:
.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
}
去掉这两种边框样式,你就可以轻轻松松获得你想要的成功。
关于html - 如何删除 bootstrap 3.0 表格的底部边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19331774/