[英]Custom header in angular material accordion
How can I customize <mat-panel-title>
to support a subtitle under a header?如何自定义
<mat-panel-title>
以支持 header 下的字幕? I try to add some HTML tags but not work.我尝试添加一些 HTML 标签但不起作用。 For now i have this:
现在我有这个:
You can use a flex-box display:您可以使用弹性盒显示:
<mat-panel-title style="display: flex; flex-direction: column">
<span>HEADER</span>
<span>subtitle</span>
</mat-panel-title>
But do it using a css class selector.但是使用 css class 选择器来实现。
.column-layout {
display: flex;
flex-direction: column;
}
<mat-panel-title class="column-layout">
<span>HEADER</span>
<span>subtitle</span>
</mat-panel-title>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.