Angular Material Table -Border Inside the Table

后端 未结 2 1656
小鲜肉
小鲜肉 2021-02-06 12:27

I am using Angular material table and I want to set border inside the table, Using CSS I was able to set border: Normal case [

2条回答
  •  眼角桃花
    2021-02-06 12:45

    Approach:1 You need to stretch your table cell content whenever parent row height grows. To do that you can make your table cell a flex box, add an additional class to mat-cell and add these to your css:

    .mat-cell .flex-stretch {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-align-self: stretch;
        -ms-flex-item-align: stretch;
        align-self: stretch;
        /* align-items center so that cell content is vertically centered */
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
    }
    

提交回复
热议问题