物料设计2个标签在底部对齐 [英] Material Design 2 Tabs aligned at bottom
本文介绍了物料设计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.
组件演示站点的选项卡"部分在"API参考"部分中引用了以下内容
@Input() | Position of the tab header.
headerPosition |
/** Possible positions for the tab header. */
export type MdTabHeaderPosition = 'above' | 'below';
因此,以下内容对我有用
Thus, the following worked for me
<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>
这篇关于物料设计2个标签在底部对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文