回答編集履歴

1

tr:nth-of-type(2) に修正

2022/04/26 12:22

投稿

int32_t
int32_t

スコア20888

test CHANGED
@@ -3,7 +3,7 @@
3
3
  `:first-of-type` の `type` というのはタグ名のことです。「`time`クラスの1番目」という意味ではありません。`time` クラスは `<tr>`の最初の子`<td>` すべてに付いているので、すべてにマッチします。
4
4
 
5
5
  ```css
6
- tbody:not(:first-child) tr:first-of-type .time {
6
+ tbody:not(:first-child) tr:nth-of-type(2) .time {
7
7
  ```
8
8
  でしょうか。
9
9
 
@@ -13,7 +13,7 @@
13
13
  >こちらの指定は効いていないように見えます。
14
14
 
15
15
  こちらも同様で、`price`クラスは2番目の子`<td>`についているので、マッチすることはありません。
16
- 同様に、`tr:first-of-type` を使いましょう。
16
+ 同様に、`tr:nth-of-type(2)` を使いましょう。
17
17
 
18
18
 
19
19