admin管理员组文章数量:1292175
I tried to change the fontSize
, but it did not take effect:
<Table
style={{overflow: 'hidden', width: '100%', fontSize: '10px'}}
dataSource={data.dataSource}
columns={columns}
size='small'
bordered
pagination={false}
/>
Also my table doesn't fit in the block. Only 3 columns are displayed and the rest disappear. How can this be resolved?
I tried to change the fontSize
, but it did not take effect:
<Table
style={{overflow: 'hidden', width: '100%', fontSize: '10px'}}
dataSource={data.dataSource}
columns={columns}
size='small'
bordered
pagination={false}
/>
Also my table doesn't fit in the block. Only 3 columns are displayed and the rest disappear. How can this be resolved?
Share Improve this question edited Aug 12, 2020 at 9:41 Ed Lucas 7,3554 gold badges40 silver badges50 bronze badges asked Aug 12, 2020 at 8:19 Утка ОбычнаяУтка Обычная 951 gold badge2 silver badges11 bronze badges2 Answers
Reset to default 5your-stylesheet.scss:
.ant-table table { font-size: 10px; }
Here is the original answer you can use sass or less.
.booking_information_table {
:global {
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
fontSize: '10px';
}
}
Secondly You can use the scroll property of Table and remove overflow: hidden
本文标签: javascriptHow to change the fontSize in an Antd tableStack Overflow
版权声明:本文标题:javascript - How to change the fontSize in an Antd table - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741548588a2384743.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论