核心属性
border-collapse: collapse 表格的边框会合并为一个单一的边框
tr:not(:last-child) 选择除了表格的最后一行
-
<table id=jaeger-specs>
-
<caption>机甲规格表</caption>
-
<thead>
-
<tr>
-
<th></th>
-
<th scope=col>国家
-
<th scope=col>高度<span> (米)</span>
-
<th scope=col>重量<span> (吨)</span>
-
</tr>
-
</thead>
-
<tbody>
-
<tr>
-
<th scope=row>Gipsy Danger
-
<td>美国
-
<td>79
-
<td>1980
-
</tr>
-
<tr>
-
<th scope=row>Striker Eureka
-
<td>澳大利亚
-
<td>76
-
<td>1850
-
</tr>
-
<tr>
-
<th scope=row>Crimson Typhoon
-
<td>中国
-
<td>76
-
<td>1722
-
</tr>
-
<tr>
-
<th scope=row>Coyote Tango
-
<td>日本
-
<td>86
-
<td>2312
-
</tr>
-
<tr>
-
<th scope=row>Cherno Alpha
-
<td>俄罗斯
-
<td>85
-
<td>2412
-
</tr>
-
</tbody>
-
</table>
-
#jaeger-specs {
-
border-collapse: collapse;
-
margin: 3rem auto;
-
}
-
#jaeger-specs caption {
-
margin-bottom: 2rem;
-
font-size: 2rem;
-
font-family: "SimHei", sans-serif;
-
}
-
#jaeger-specs td,
-
#jaeger-specs th {
-
text-align: center;
-
padding: 1.5rem;
-
}
-
#jaeger-specs th[scope] {
-
color: #fff;
-
background-color: #000;
-
font-weight: normal;
-
}
-
#jaeger-specs tbody {
-
border: 1px solid #222;
-
}
-
#jaeger-specs tbody th,
-
#jaeger-specs tbody th + td {
-
text-align: left;
-
font-weight: normal;
-
}
-
#jaeger-specs tbody th {
-
font-size: 1.1rem;
-
border-right: 1px solid #222;
-
background-size: cover;
-
font-family: Agency, Arial, sans-serif;
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
-
}
-
#jaeger-specs tbody tr:nth-child(1) th {
-
background: url(https://pics.codecolor.cn/responsive-data-grid/gipsy-danger.jpg);
-
}
-
#jaeger-specs tbody tr:nth-child(2) th {
-
background: url(https://pics.codecolor.cn/responsive-data-grid/striker-eureka.jpg);
-
}
-
#jaeger-specs tbody tr:nth-child(3) th {
-
background: url(https://pics.codecolor.cn/responsive-data-grid/crimson-typhoon.jpg);
-
}
-
#jaeger-specs tbody tr:nth-child(4) th {
-
background: url(https://pics.codecolor.cn/responsive-data-grid/coyote-tango.jpg);
-
}
-
#jaeger-specs tbody tr:nth-child(5) th {
-
background: url(https://pics.codecolor.cn/responsive-data-grid/cherno-alpha.jpg);
-
}
-
#jaeger-specs tbody tr:not(:last-child) {
-
border-bottom: 1px solid #222;
-
}
-
#jaeger-specs thead th[scope] {
-
border: 1px solid #222;
-
border-bottom: none;
-
}
-
#jaeger-specs tbody td:not(:last-child) {
-
border-right: 1px solid #222;
-
}
-
#jaeger-specs tbody td {
-
background: hsl(195, 100%, 20%);
-
color: #fff;
-
}
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 背景图片闪白问题
- idea 更换编辑器背景图片
- 去掉模糊背景或图片的白边
- ElementUI 实现表格可编辑 Editable,增删改查编辑表格Grid
- 开源 UI 库中,唯一同时实现了大表格虚拟化和树表格的 Table 组件 原 荐
- html复杂表格
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Distributed Algorithms: An Intuitive Approach
Wan Fokkink / MIT Press / 2018-2-2 / USD 48.00
The new edition of a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. This book offers students and researchers a guide to ......一起来看看 《Distributed Algorithms: An Intuitive Approach》 这本书的介绍吧!
RGB HSV 转换
RGB HSV 互转工具
RGB CMYK 转换工具
RGB CMYK 互转工具