关于 table 标签的一系列 CSS



<table>
, <caption>
, <thead>
, <tbody>
, <tr>
, <th>
, <td>
,<tfoot>
使用 scope="column"
和 scope="row"
来确认 <th>
的归属
-
th:not()
排除掉符合的元素 -
div p:first-child
:只有 div 中第一个元素是 p 的才会被选择。 -
div p:first-of-type
:如果 div 中有 P 元素,则选择第一个 P 元素。 -
::before
:用于在选定元素的内容前插入内容。 -
::after
:用于在选定元素的内容后插入内容。 -
:where()
:不正确或不受支持的选择器将被忽略,其他选择器将被使用。 -
:nth-child()
用于匹配父元素的特定子元素。-
Number
,索引从 1 开始 -
even
,选择偶数位的元素 -
odd
,选择奇数位的元素 -
an + b
,每 a 个元素选择第 b 个,没有 b 的新情况下选默认最后一个。
-
-
caption-side: bottom;
标题(caption)位置设置在表格的底部 -
text-align: start;
根据文字的书写方向确定对齐 -
border-block:none;
:设置元素的上下边框。 -
border-block-start:none;
设置元素的上边框。 -
border-block-end:none;
设置元素的下边框。 -
border-inline:none;
: 设置元素的左右边框。 -
border-inline-start:none;
: 设置元素的左边框。 -
border-inline-end:none;
: 设置元素的右边框。