角度材料2卡可滚动
发布时间:2020-12-17 17:44:38 所属栏目:安全 来源:网络整理
导读:如何使mat-card材料2组件内的内容滚动?我没有在材料2网站上找到任何东西 解决方法 这不是内置功能.要使内容可滚动,请为 mat-card-content设置高度.选择.这是一个例子: mat-card mat-card-header mat-card-titleCARD TITLE/mat-card-title /mat-card-header
如何使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> 链接到StackBlitz demo. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |