¥Basic data cells
此示例使用
¥This example uses
HTML
某些表行(
¥Some table rows (
注意:通常,会实现带有列标题的表头组,以便更容易理解列中的信息。 和
¥Note: Normally, a table head group with column headers would be implemented to make it easier to understand the information in the columns. The and
elements would be used to group such rows of headers and data into the respective table head and body sections. This is not implemented in this example to focus on the data cells and reduce the complexity of this example.html
A | 阿尔法 | 阿尔法赫 |
---|---|---|
B | 布拉沃 | BRAH voh |
C | 查理 | 查利 |
D | 三角洲 | 戴尔他 |
CSS
一些基本的 CSS 用于设置表格及其单元格的样式。CSS 属性选择器 和 :nth-of-type 伪类用于交替单元格的外观,以使表中的信息更易于理解和识别。
¥Some basic CSS is used to style the table and its cells. CSS attribute selectors and the :nth-of-type pseudo-class are used to alternate the appearance of the cells to make the information in the table easier to understand and identify.
csstd,
th {
border: 1px solid rgb(160 160 160);
padding: 8px 10px;
}
tr:nth-of-type(odd) td {
background-color: #eee;
}
tr th[scope="row"] {
background-color: #d6ecd4;
}
csstable {
border-collapse: collapse;
border: 2px solid rgb(140 140 140);
font-family: sans-serif;
font-size: 0.8rem;
letter-spacing: 1px;
}
结果
¥Result
相关推荐

男朋友太爱我了怎么办

【學 Photoshop】裁切工具 Crop Tool 常見 5 大問題
