gpt4 book ai didi

angular - Angular 材卡头如何填写

转载 作者:行者123 更新时间:2023-12-02 20:43:29 24 4
gpt4 key购买 nike

我有像下一个模板一样的 Angular Material 经典卡片

<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>

enter image description here

并尝试填写银色标题,例如

enter image description here

最佳答案

您可以使用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>

并设置这些CSS

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

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

mat-card{
padding:0;
}

example app

关于angular - Angular 材卡头如何填写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56022641/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com