我在使用Bootstrap时有点被一个CSS问题困住了。我也在使用Angular JS与Angular UI.bootstrap(这可能是问题的一部分)。
我在做一个网站,在一个表格中显示数据。 有的时候,数据中包含的对象我必须在表格中显示。 所以我想把无边框表格放在普通表格里,同时为无边框表格保留内部分隔线。
但是,似乎即使我明确说不在表格上显示边框,它也会被强制显示。
HTML。
<table class='table borderless'>
CSS。
.borderless table {
border-top-style: none;
border-left-style: none;
border-right-style: none;
border-bottom-style: none;
}
所以在这里,我想要的只是内侧的边框。
边框造型是在td
元素上设置的。
html。
<table class='table borderless'>
css:
.borderless td, .borderless th {
border: none;
}
更新:从Bootstrap 4.1开始,你可以使用.table-borderless
来删除边框。
https://getbootstrap.com/docs/4.1/content/tables/#borderless-table
不要在你的"