如何使mat-card材料2组件内的内容滚动?我没有在材料2网站上找到任何东西
解决方法
这不是内置功能.要使内容可滚动,请为< mat-card-content>设置高度.选择.这是一个例子:
<mat-card> <mat-card-header> <mat-card-title>CARD TITLE</mat-card-title> </mat-card-header> <mat-card-content [style.overflow]="'auto'" [style.height.px]="'300'"> <p> The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan. A small,agile dog that copes very well with mountainous terrain,the Shiba Inu was originally bred for hunting. </p> </mat-card-content> <mat-card-actions> <button mat-button>LIKE</button> <button mat-button>SHARE</button> </mat-card-actions> </mat-card>