Angular 4 Material 2 - 中心标签组件 [英] Angular 4 Material 2 - Center Tab Components
本文介绍了Angular 4 Material 2 - 中心标签组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道如何将 Angular Material Tab 组件居中.
可以在这里看到:
非常感谢您的帮助.
解决方案
看起来你正在寻找的是 md-stretch-tabs
属性,它应该应用于 <md-tab-group>
:
<md-tab label="Tab 1"><p>选项卡 1 的内容.</p></md-tab><md-tab label="Tab 2"><p>选项卡 2 的内容.</p></md-tab>...</md-tab-group>
I couldn't find out how to center the Angular Material Tab Component.
Can be seen here: https://material.angular.io/components/tabs/overview
I think there even is a way of doing it included, it is just very unclear what to do imo.
Below is a screenshot of the docs. What's meant by properties? Is it in html or does it need to be set in the typescript ?
I would really appreciate your help.
解决方案
Looks like what you're looking for is the md-stretch-tabs
attribute, which should be applied on <md-tab-group>
:
<md-tab-group md-stretch-tabs>
<md-tab label="Tab 1">
<p>Content for tab 1.</p>
</md-tab>
<md-tab label="Tab 2">
<p>Content for tab 2.</p>
</md-tab>
...
</md-tab-group>
这篇关于Angular 4 Material 2 - 中心标签组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文