鍍金池/ 問答/HTML/ 為什么設(shè)置了表格圓角但是沒起作用

為什么設(shè)置了表格圓角但是沒起作用

clipboard.png

上面的起作用了但是下面的,沒起作用

clipboard.png

thead {
    color: transparent;
    background: linear-gradient(90deg, #3977e2, #13a9ff);
    font-size: 12px;
    line-height: 1;
  }
  tbody {
    box-sizing: border-box;
    td {
      padding: 20px 0;
      border: 2px solid #dcdcdc;
    }
    tr td:nth-child(1) {
      padding-left: 30px;
    }
  }
  tbody tr:first-child td {
    border-top: none;
  }
  tbody tr:first-child td:nth-child(1), tbody tr:nth-child(2) td:nth-child(1), tbody tr:nth-child(3) td:nth-child(1), tbody tr:nth-child(4) td:nth-child(1) {
    border-left: 2px solid #3f6fde;
  }
  tbody tr:first-child td:nth-child(5) {
    border-right: 2px solid #3f6fde;
    border-bottom: 2px solid #3f6fde;
  }
  tbody tr:nth-child(4) td, tbody tr:nth-child(2) td:nth-child(4) {
    border-bottom: 2px solid #3f6fde;
  }
  table thead tr td:first-child {
    border-top-left-radius: 12px;
  }

  table thead tr td:last-child {
    border-top-right-radius: 12px;
  }
  table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
  }

  table tbody tr:first-child td:last-child {
    border-bottom-right-radius: 12px;
  }
回答
編輯回答
笨小蛋

是因為你選擇器的問題,建議把last-child更改為last-type-of應(yīng)該就可以了

2017年10月10日 07:55
編輯回答
司令

最后的樣式

 table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
  }
2018年4月28日 16:23
編輯回答
涼汐

查看元素看一下是不是選擇器的問題

2017年2月23日 13:30