核心属性
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;
-
}
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
高质量程序设计艺术
斯皮内利斯 / 韩东海 / 人民邮电出版社 / 2008-1 / 55.00元
在本书中,作者回归技术层面。从Apache web server、BSD版本的Unix system、ArgoUMl、ACE网络编程库等著名开源软件中选取了大量真实C、C++和java语言源代码,直观而深刻的阐述了代码中可能存在的各种质量问题,涉及可靠性、安全性、时间性和空间性、可移植性、可维护性以及浮点运算等方面,很多内容都市独辟蹊径,发前人所未发。正因如此,本书继作者的《代码阅读》之后在获Jo......一起来看看 《高质量程序设计艺术》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
SHA 加密
SHA 加密工具