Ant.Design Tabs alignment

Fre*_*dy. 2 css flexbox reactjs antd

I have made a basic Tabs component following this documentation here.

This is my current output. 在此处输入图片说明

Does anyone know the CSS to align ant-tabs-tab at the center?

I can see that there are different position placement however there isn't a top-center option.

Current CSS:

  .ant-tabs-tab {
    flex-grow: 1;
    margin-right: 0px;
    width: 80%;
    text-align: center;
  }
Run Code Online (Sandbox Code Playgroud)

The output from the above CSS. I would like to keep the same size as the first image but have it center aligned. Not sure if this is possible but I thought I'd check first.

在此处输入图片说明

小智 8

您在选项卡组件中有一个名为 centered 的属性,并且所有 TabPane 都将居中。

<Tabs centered>
Run Code Online (Sandbox Code Playgroud)


Den*_*ash 5

你的意思是这样吗?

在此处输入图片说明

.ant-tabs-nav-scroll {
  display: flex;
  justify-content: center;
}
Run Code Online (Sandbox Code Playgroud)

编辑 Q