Home  >  Q&A  >  body text

javascript - How to change the font in the Table in ant design?

How to change the font in the Table in ant design?

The font of Table in ant design is too small. I want to make it larger. How can I change it?
My code is as follows:

<Table className='logListTable' 
     columns={columns} 
     dataSource={this.state.data} 
     pagination={{ pageSize: 50, size: 'default'}} 
     scroll={{ y: 560 }} 
     size='middle' 
     />

css in:

.logListTable {
  font-size: 20px; 
}

I changed the style in css like this, but it doesn't work. The font size is still the default size.
How to change the font? Thanks!

黄舟黄舟2670 days ago1807

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-06-28 09:28:04

    Inspect the element, check the applied or inherited font size, and then modify it,

    reply
    0
  • Cancelreply