3 html css twitter-bootstrap twitter-bootstrap-3
我有一个我正在研究的新项目,我正在使用Bootstrap 3.0.
我有一个表"class"(并没有),它有一个thead和tbody在它的DOM中.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;}
Run Code Online (Sandbox Code Playgroud)
是的,您可以删除此边框:
在css文件中,您可以看到:
在bootstrap中你有以下CSS For border-bottomtable on table head元素:
.table thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid hsl(0, 0%, 87%);
}
Run Code Online (Sandbox Code Playgroud)
并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
}
Run Code Online (Sandbox Code Playgroud)
通过删除这两种边框样式,您可以轻松获得成功和所需.
这是边界:
.table thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}
Run Code Online (Sandbox Code Playgroud)
您可以根据需要对其进行编辑。
也编辑这个类:
.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;
Run Code Online (Sandbox Code Playgroud)