回答編集履歴

2

整形

2019/09/06 07:45

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36134

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  大雑把に言うと、CSS3では、セレクタは【単純セレクタ】【結合子】【単純セレクタ】【結合子】……の繰り返しで表現されています。
18
18
 
19
- >A selector is a chain of one or more sequences of simple selectors separated by combinators.
19
+ > A selector is a chain of one or more sequences of simple selectors separated by combinators.
20
20
 
21
21
  [Selectors Level 3](https://drafts.csswg.org/selectors-3/#selector-syntax)
22
22
 

1

追記

2019/09/06 07:45

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36134

test CHANGED
@@ -9,3 +9,43 @@
9
9
  > 子孫結合子を利用したセレクターは子孫セレクターと呼ばれます。
10
10
 
11
11
  [子孫結合子 - CSS: カスケーディングスタイルシート | MDN](https://developer.mozilla.org/ja/docs/Web/CSS/Descendant_combinator)
12
+
13
+
14
+
15
+ ### 追記
16
+
17
+ 大雑把に言うと、CSS3では、セレクタは【単純セレクタ】【結合子】【単純セレクタ】【結合子】……の繰り返しで表現されています。
18
+
19
+ >A selector is a chain of one or more sequences of simple selectors separated by combinators.
20
+
21
+ [Selectors Level 3](https://drafts.csswg.org/selectors-3/#selector-syntax)
22
+
23
+
24
+
25
+ `.tabs-menu li`
26
+
27
+ の場合、
28
+
29
+ 【.tabs-menu】【 】【li】ということです。
30
+
31
+
32
+
33
+ 【.tabs-menu】は単純セレクタのうちのクラスセレクタ、
34
+
35
+ 【 】は子孫結合子、
36
+
37
+ 【li】はタイプセレクタ、
38
+
39
+ とそれぞれ分解できます。
40
+
41
+ 「子孫セレクタ」という用語はCSS3ではなくなっている(と思う)のですが、CSS2からの歴史的な背景があり、子孫結合子が使われたセレクタを、「子孫セレクタ」と呼ぶことが多いです。
42
+
43
+
44
+
45
+ なので、
46
+
47
+ 「【.tabs-menu】【 】【li】は子孫セレクタですか?」と聞かれると、「まあ、そうですね」という回答になります。
48
+
49
+
50
+
51
+ 参考になりますでしょうか?