回答編集履歴

2

修正

2017/10/12 18:54

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
  ```CSS
58
58
 
59
- .parent a[href*='foo']:not([href*='baz']),.parent a[href*='bar']:not([href*='baz']){} /* matches擬似クラスを使わない場合 */
59
+ .parent a[href*='foo']:not([href*='baz']), .parent a[href*='bar']:not([href*='baz']){} /* matches擬似クラスを使わない場合 */
60
60
 
61
61
  .parent a:matches([href*='foo'], [href*='bar']):not([href*='baz']){} /* matches擬似クラスを使う場合 */
62
62
 

1

修正

2017/10/12 18:54

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -34,9 +34,9 @@
34
34
 
35
35
  <script>
36
36
 
37
- var elements = document.querySelectorAll(".parent a[href*='foo']:not([href*='baz']), a[href*='bar']:not([href*='baz'])");
37
+ var elements = document.querySelectorAll(".parent a[href*='foo']:not([href*='baz']),.parent a[href*='bar']:not([href*='baz'])");
38
38
 
39
-
39
+
40
40
 
41
41
  for (var i = 0; i < elements.length; i++) {
42
42
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  ```CSS
58
58
 
59
- .parent a[href*='foo']:not([href*='baz']), a[href*='bar']:not([href*='baz']){} /* matches擬似クラスを使わない場合 */
59
+ .parent a[href*='foo']:not([href*='baz']),.parent a[href*='bar']:not([href*='baz']){} /* matches擬似クラスを使わない場合 */
60
60
 
61
61
  .parent a:matches([href*='foo'], [href*='bar']):not([href*='baz']){} /* matches擬似クラスを使う場合 */
62
62