text-align in md-grid-tile (Angular Material) doesn't work

后端 未结 5 710
野趣味
野趣味 2021-02-04 01:19

text-align in Angular Material doesn\'t work.

{{video         


        
5条回答
  •  忘了有多久
    2021-02-04 01:45

    Target div elements inside mat-grid-tile with a width of 100 percent.

    my.component.scss

    mat-grid-tile div {
      width: 100%;
      text-align: left;
    }
    

    my.component.html

    
      
        Hero avatar
      
    
      
        

    {{ hero.firstName }} {{ hero.lastName }}

提交回复
热议问题