如何使边框底部颜色高于边框右侧颜色?

时间:2021-06-16 02:55:34

标签: html css

在下面的示例中,边框右侧颜色优先于边框底部颜色。

enter image description here

有没有办法让水平边界线在垂直线上不中断地流动?

table th,
table td {
  border-right: 10px solid rgba(229, 231, 235);
  border-bottom: 10px solid rgba(229, 231, 235);
}

table th {
  border-bottom: 10px solid rgba(156, 163, 175);
}
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"/>
<table>
  <tr>
    <th>a</th>
    <th>b</th>
  </tr>
  <tr>
    <td>1</td>
    <td>1</td>
  </tr>
</table>

1 个答案:

答案 0 :(得分:0)

这是你想要的吗?

table th,
table td {
  border-right: 10px solid rgba(229, 231, 235);
  border-bottom: 10px solid rgba(229, 231, 235);
}
table tr{
  border-bottom: 10px solid rgba(229, 231, 235);
}
table th {
  border-bottom: 10px solid rgba(156, 163, 175);
}
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"/>
<table>
  <tr>
    <th>a</th>
    <th>b</th>
  </tr>
  <tr>
    <td>1</td>
    <td>1</td>
  </tr>
</table>

相关问题