Fre*_*dy. 2 css flexbox reactjs antd
I have made a basic Tabs component following this documentation here.
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)
你的意思是这样吗?
.ant-tabs-nav-scroll {
display: flex;
justify-content: center;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3149 次 |
| 最近记录: |