简体   繁体   English

如何填写角材卡头

[英]How to fill in the angular-material card header

I have angular-material classic card like with the next template 我有类似下一个模板的棱角分明的经典卡片

<mat-card class="example-card">
  <mat-card-header>
    <mat-card-title>Shiba Inu</mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <p>The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.</p>
  </mat-card-content>
</mat-card>

在此处输入图片说明

and trying to fill in silver header like 并尝试填写像

在此处输入图片说明

You can use mat-card-header and mat-card-content , 您可以使用mat-card-headermat-card-content

<mat-card class="example-card">
   <mat-card-header>
        <mat-card-title>Shiba Inu</mat-card-title>
   </mat-card-header>
   <mat-card-content>
    <p>The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.</p>
   </mat-card-content>
</mat-card>

and set these css 并设置这些CSS

mat-card-header{
  background: #12121212;
  padding: 5px;
  color:white;
}

mat-card-content{
  padding: 10px;
}

mat-card{
  padding:0;
}

example app 示例应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM