【发布时间】:2020-01-20 01:25:38
【问题描述】:
我尝试使用 react-bootstrap-table2 "Table with caption" example 中的代码,但我的标题在表格下方。我找到了这个答案:"That's because bootstrap 4 has default caption css style - caption-side: bottom",但这与 react-bootstrap-table2 无关,也没有给出示例。然后我找到了这个页面:caption-side。
所以我创建了tables.css:
.top caption {
caption-side: top;
}
我使用import './tables.css'; 导入了它。我将类名添加到我的表中:
<BootstrapTable
className="top"
bootstrap4={ true }
caption={ <CaptionElement /> }
keyField='id'
data={ data.team.bids }
columns={ columns }
striped
hover />
但标题还在桌子底下。
如何让标题位于表格上方?
【问题讨论】:
标签: css reactjs react-bootstrap-table