table中给某一个tr设置border-radius无效

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    table{
      border:solid 1px #ddd;
    }
    th{
      border-right: solid 1px #ddd;
      border-bottom: solid 1px #ddd;
    }
    td{
      border-right: solid 1px #ddd;
      border-bottom: solid 1px #ddd;
    }
    th:last-child{
      border-right: 0;
      border-bottom: 0;
    }
    th:last-child{
      border-right: 0;
      border-bottom: 0;
    }
  </style>
</head>

<body>
  <table border="0">
    <tr style="background:#ddd;border-radius: 25px;">
      <th>Month</th>
      <th>Savings</th>
    </tr>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
  </table>
</body>

</html>

效果
图片.png

要怎么改才能让tr上有圆角
阅读 5.6k
1 个回答
推荐问题