Angular 4材质2-中心选项卡组件 [英] Angular 4 Material 2 - Center Tab Components
本文介绍了Angular 4材质2-中心选项卡组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法确定如何使角度材质"选项卡组件居中.
I couldn't find out how to center the Angular Material Tab Component.
可以在这里看到: https://material.angular.io/components/tabs/overview
我认为它甚至包含一种执行方法,只是不清楚如何执行imo.
I think there even is a way of doing it included, it is just very unclear what to do imo.
下面是文档的屏幕截图. 属性是什么意思?是用html还是需要在打字稿中设置?
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 ?
非常感谢您的帮助.
推荐答案
您正在寻找的是md-stretch-tabs
属性,该属性应应用于<md-tab-group>
:
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材质2-中心选项卡组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文