【发布时间】:2015-06-26 04:16:47
【问题描述】:
谁能告诉我为什么我的表格的第二行没有灰色背景?
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.phone td {background:blue; color:white;}
.phone:first-of-type td {background:grey;}
</style>
</head>
<body>
<table>
<tbody>
<tr class="email"><td>Row</td></tr>
<tr class="phone"><td>Row</td></tr>
<tr class="phone"><td>Row</td></tr>
</tbody>
</table>
</body>
</html>
【问题讨论】:
标签: css css-selectors