CSS3 border-radius on display:table-row element

前端 未结 3 654
面向向阳花
面向向阳花 2020-12-06 05:30

This is my layout:

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 06:08

    You also can fix this issue by setting float:left; on the table element. It doesn't effect the behavior of the table flexibility and works like a charm.

    table {
     float: left;
     display: table;
     width: 100%;
     border-collapse: collapse;
    }
    tr {
     display: table-row;
     width: 100%;
     padding: 0;
    }
    td {
     font-weight: bold;
     background: #fff;
     display: table-cell;
     border-radius: 10px;
    }
    

提交回复
热议问题