Material Design 2 标签在底部对齐 [英] Material Design 2 Tabs aligned at bottom
本文介绍了Material Design 2 标签在底部对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想让标签在 md-tab-group 的底部对齐,如下所示:
I want to have tabs aligned at the bottom of the md-tab-group, like shown below:
在材料 1 中使用 md-tabs-align="bottom" 是可能的.材料 2 中是否有用于此目的的任何内容?
It is possible in Material 1 using md-tabs-align="bottom". Is there anything available in Material 2 for this purpose?
这是我的代码:
<md-tab-group>
<md-tab label="Tab One">
Tab One Contents
</md-tab>
<md-tab label="Tab Two">
Tab Two Contents
</md-tab>
</md-tab-group>
推荐答案
对于可能会遇到此问题的任何人.
For whomever may stumble across this question.
组件演示站点的 Tabs 部分引用了 API 参考部分中的以下内容
@Input() | Position of the tab header.
headerPosition |
/** Possible positions for the tab header. */
export type MdTabHeaderPosition = 'above' | 'below';
因此,以下对我有用
<md-tab-group headerPosition="below">
<md-tab label="Tab One">
Tab One Contents
</md-tab>
<md-tab label="Tab Two">
Tab Two Contents
</md-tab>
</md-tab-group>
这篇关于Material Design 2 标签在底部对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文