角形材料手风琴中的自定义页眉

时间:2020-04-09 08:27:31

标签: angular angular-material

如何自定义[Authorize, Route(nameof(AdminController))] public class AdminController : Controller { [HttpPost, Route(nameof(ClearAllCaches))] public void ClearAllCaches() { // Do Something } } 以支持标题下的字幕?我尝试添加一些HTML标记,但不起作用。 现在我有这个:

enter image description here

my stackblitz

1 个答案:

答案 0 :(得分:1)

您可以使用弹性框显示:

<mat-panel-title style="display: flex; flex-direction: column">
  <span>HEADER</span>
  <span>subtitle</span>
</mat-panel-title>

但是可以使用CSS类选择器来实现。

在CSS文件中:

.column-layout {
  display: flex; 
  flex-direction: column;
}

在您的模板中:

<mat-panel-title class="column-layout">
  <span>HEADER</span>
  <span>subtitle</span>
</mat-panel-title>