{"id":16045,"date":"2026-11-13T19:55:13","date_gmt":"2026-11-13T10:55:13","guid":{"rendered":"https:\/\/code-plus.jp\/gp\/?p=16045"},"modified":"2026-11-13T20:50:50","modified_gmt":"2026-11-13T11:50:50","slug":"css-isnothas-16045","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/css-isnothas-16045\/","title":{"rendered":"\u30af\u30e9\u30b9\u540d\u6307\u5b9a\u5b9f\u4f8b\u96c6\uff5c:is() \/ :not() \/ :has() \u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u306e\u4f4d\u7f6e\u9078\u629e"},"content":{"rendered":"<p><code>:is()<\/code> \/ <code>:not()<\/code> \/ <code>:has()<\/code> \u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u300c\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u306e\u4f4d\u7f6e\u9078\u629e\u300d\u307e\u3067\u3092\u6574\u7406\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u30bb\u30ec\u30af\u30bf\u3067<b>\u3069\u306e\u8981\u7d20\u304c\u8d64\u304f\u306a\u308b\u304b<\/b>\u3092\u3001\u5b9f\u969b\u306b\u8868\u793a\u3057\u3066\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\r\n\r\n<a href=\"https:\/\/code-plus.jp\/gp\/nth-of-type-12913\/\" class=\"linkbox my-1.5r\">\r\n<strong class=\"linkbox-title fz-md\">nth-\u7cfb\u30bb\u30ec\u30af\u30bf\u306e\u5b9f\u4f8b\u307e\u3068\u3081\uff5c:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of\u69cb\u6587 \u307e\u3067 | CODE PLUS\uff08\u30b3\u30fc\u30c9\u30d7\u30e9\u30b9\uff09<\/strong>\r\n<picture class=\"linkbox-thumbnail\">\r\n<img decoding=\"async\" width=\"300\" height=\"200\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/ec7482348bf095c3682cdeabd5682bad-4.jpg?ver=20261113205050\" alt=\"nth-\u7cfb\u30bb\u30ec\u30af\u30bf\u306e\u5b9f\u4f8b\u307e\u3068\u3081\uff5c:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of\u69cb\u6587 \u307e\u3067 | CODE PLUS\uff08\u30b3\u30fc\u30c9\u30d7\u30e9\u30b9\uff09\" loading=\"lazy\" \/>\r\n<\/picture>\r\n<span class=\"linkbox-excerpt\">\u300c\u6700\u521d\u306e\u8981\u7d20\u3060\u3051\u30b9\u30bf\u30a4\u30eb\u3092\u5909\u3048\u305f\u3044\u300d\u300c\u6700\u5f8c\u306e3\u3064\u3060\u3051\u30de\u30fc\u30b8\u30f3\u3092\u306a\u304f\u3057\u305f\u3044\u300d\u2014\u2014\u3053\u3046\u3044\u3063\u305f\u4f4d\u7f6e\u30d9\u30fc\u30b9\u306e\u6307\u5b9a\u306fCSS\u3067\u3088\u304f\u66f8\u304f\u66f8\u304d\u65b9\u3067\u3059\u3002:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of \u69cb\u6587\u307e\u3067\u3092\u6574\u7406\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u30bb\u30ec\u30af...\r\n&emsp;<u class=\"linkbox-more\">\u7d9a\u304d\u3092\u8aad\u3080<\/u>\r\n<\/span>\r\n<\/a>\r\n\r\n<!-- \u2756\u76ee\u6b21\u30ea\u30b9\u30c8 -->\r\n<nav class=\"tocList mt-1.5r\" data-toc-id=\"js-tocBWGD\" style=\"height:28rem\"><\/nav>\r\n<nav class=\"tocBtn is-fixed\" data-toc-id=\"js-tocBWGD\"><\/nav>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 id=\"s1\">1. \u81ea\u5206\u81ea\u8eab\u306e\u30af\u30e9\u30b9<\/h2>\r\n<p>\u5168\u3066\u306e <code class=\"i\">li<\/code> \u306b <code class=\"i\">.target<\/code> \u304c\u4ed8\u304d\u3001\u2462 \u2464 \u2465 \u2467 \u306b\u306f\u3055\u3089\u306b <code class=\"i\">.christina<\/code> \u304c\u4ed8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\r\n\r\n<div class=\"grid\">\r\n  <div class=\"card\">\r\n    <h3>.christina \u3092\u6301\u3064<\/h3>\r\n    <pre class=\"language-css\"><code>li.christina { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"1\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\nli.christina { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u3092\u6301\u3064\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u3092\u6301\u305f\u306a\u3044<\/h3>\r\n    <pre class=\"language-css\"><code>li:not(.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"2\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\nli:not(.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u3092\u6301\u305f\u306a\u3044\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 id=\"s2\">2. \u5b50\u5b6b\u30fb\u76f4\u4e0b\u306e\u5b50\uff08:is \/ :not\uff09<\/h2>\r\n<p>\u5165\u308c\u5b50\u306e <code class=\"i\">div.target<\/code> \u3067\u95a2\u4fc2\u3092\u898b\u307e\u3059\u3002\u2462 \u304c <code class=\"i\">.christina<\/code> \u3067\u3001\u2463 \u3068 \u2465 \u304c\u76f4\u4e0b\u306e\u5b50\u3001\u2464 \u306f\u5b6b\u3067\u3059\u3002<\/p>\r\n\r\n<div class=\"grid\">\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u5b50\u5b6b\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina .target,\r\n.target:is(.christina *) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"3\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina .target,\r\n.target:is(.christina *) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u5b50\u5b6b\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u5b50\u5b6b\u8981\u7d20\u3067\u306f\u306a\u3044<\/h3>\r\n    <pre class=\"language-css\"><code>.target:not(.christina *) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"4\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:not(.christina *) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u5b50\u5b6b\u8981\u7d20\u3067\u306f\u306a\u3044\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u76f4\u4e0b\u306e\u5b50\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina&gt;.target,\r\n.target:is(.christina&gt;*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"5\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina&gt;.target,\r\n.target:is(.christina&gt;*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u3067\u306f\u306a\u3044<\/h3>\r\n    <pre class=\"language-css\"><code>.target:not(.christina&gt;*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"6\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:not(.christina&gt;*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u3067\u306f\u306a\u3044\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u3092\u6301\u3064\u3001\u3082\u3057\u304f\u306f\u76f4\u4e0b\u306e\u5b50\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.target:is(.christina, .christina&gt;*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"7\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:is(.christina, .christina&gt;*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u3092\u6301\u3064\u3001\u3082\u3057\u304f\u306f\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u3092\u6301\u305f\u305a\u3001\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u3067\u3082\u306a\u3044<\/h3>\r\n    <pre class=\"language-css\"><code>.target:not(.christina, .christina&gt;*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"8\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:not(.christina, .christina&gt;*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u3092\u6301\u305f\u305a\u3001\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u3067\u3082\u306a\u3044\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 id=\"s3\">3. \u7956\u5148\u30fb\u89aa\uff08:has\uff09<\/h2>\r\n\r\n<div class=\"grid\">\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u7956\u5148\u8981\u7d20\uff08\u5b50\u5b6b\u8981\u7d20\u306b .christina \u304c\u3042\u308b\uff09<\/h3>\r\n    <pre class=\"language-css\"><code>.target:has(.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"9\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:has(.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u7956\u5148\u8981\u7d20\uff08\u5b50\u5b6b\u8981\u7d20\u306b .christina \u304c\u3042\u308b\uff09\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u89aa\u8981\u7d20\uff08\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u306b .christina \u304c\u3042\u308b\uff09<\/h3>\r\n    <pre class=\"language-css\"><code>.target:has(&gt;.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"10\" style=\"height:280px;\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:has(&gt;.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;div class=&quot;target&quot;&gt;\u2460\r\n    &lt;div class=&quot;target&quot;&gt;\u2461\r\n      &lt;div class=&quot;target christina&quot;&gt;\u2462\r\n        &lt;div class=&quot;target&quot;&gt;\u2463\r\n          &lt;div class=&quot;target&quot;&gt;\u2464&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;target&quot;&gt;\u2465&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=&quot;target&quot;&gt;\u2466&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u89aa\u8981\u7d20\uff08\u76f4\u4e0b\u306e\u5b50\u8981\u7d20\u306b .christina \u304c\u3042\u308b\uff09\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 id=\"s4\">4. .christina \u3092\u6301\u3064\u8981\u7d20\u306e\u4e2d\u3067\u306e\u4f4d\u7f6e<\/h2>\r\n<p>\u2460 \u301c \u2468 \u306e\u3046\u3061 \u2462 \u2464 \u2465 \u2467 \u304c <code class=\"i\">.christina<\/code> \u3067\u3059\u3002<\/p>\r\n\r\n<div class=\"grid\">\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u6700\u521d\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina:not(.christina~*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"11\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina:not(.christina~*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u6700\u521d\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u6700\u521d\u4ee5\u5916<\/h3>\r\n    <pre class=\"language-css\"><code>.christina:is(.christina~*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"12\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina:is(.christina~*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u6700\u521d\u4ee5\u5916\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u6700\u5f8c\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina:not(:has(~.christina)) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"13\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina:not(:has(~.christina)) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u6700\u5f8c\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u6700\u5f8c\u4ee5\u5916<\/h3>\r\n    <pre class=\"language-css\"><code>.christina:has(~.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"14\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina:has(~.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u6700\u5f8c\u4ee5\u5916\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 id=\"s5\">5. \u96a3\u63a5\u30fb\u5144\u5f1f\u95a2\u4fc2<\/h2>\r\n<p><code class=\"i\">.target<\/code> \u306f\u5168\u3066\u306e <code class=\"i\">li<\/code> \u306b\u4ed8\u3044\u3066\u3044\u308b\u305f\u3081\u3001<code class=\"i\">.christina<\/code> \u81ea\u8eab\u3082\u5bfe\u8c61\u306b\u306a\u308a\u5f97\u308b\u70b9\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u2464 \u306e\u76f4\u5f8c\u306e \u2465 \u3082 <code class=\"i\">.christina<\/code> \u3067\u3059\uff09\u3002<\/p>\r\n\r\n<div class=\"grid\">\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u76f4\u5f8c\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina+.target { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"15\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina+.target { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u76f4\u5f8c\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u5f8c\u308d\u3059\u3079\u3066\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.christina~.target { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"16\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.christina~.target { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u5f8c\u308d\u3059\u3079\u3066\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u76f4\u5f8c\u306e\u8981\u7d20\u3067\u306f\u306a\u3044<\/h3>\r\n    <pre class=\"language-css\"><code>.target:not(.christina+*) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"17\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:not(.christina+*) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u76f4\u5f8c\u306e\u8981\u7d20\u3067\u306f\u306a\u3044\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u306e\u76f4\u524d\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.target:has(+.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"18\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:has(+.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u306e\u76f4\u524d\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n  <div class=\"card\">\r\n    <h3>.christina \u3088\u308a\u524d\u306e\u3059\u3079\u3066\u306e\u8981\u7d20<\/h3>\r\n    <pre class=\"language-css\"><code>.target:has(~.christina) { background: red; }<\/code><\/pre>\r\n    <div class=\"var\">\r\n      <iframe data-demo=\"19\" srcdoc=\"&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;ja&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;sample&lt;\/title&gt;\r\n&lt;style&gt;\r\nbody { margin: 0; font-family: sans-serif; }\r\n.box { padding: 14px 20px; }\r\n\r\n\/* ul.shelf-wrapper &gt; li\uff08\u30bc\u30ed\u8a73\u7d30\u5ea6\u3067\u4e0b\u5730\u3060\u3051\u4f5c\u308b\uff09 *\/\r\n:where(.shelf-wrapper) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }\r\n:where(.shelf-wrapper[data-cols=&quot;3&quot;]) { width: calc(50px * 3 + 6px * 2); }\r\n:where(.shelf-wrapper &gt; li) { box-sizing: border-box; width: 50px; height: 50px; display: grid; place-items: center; background: #e8e8e8; border-radius: 4px; font: 700 16px\/1 sans-serif; color: #333; }\r\n\r\n\/* \u5165\u308c\u5b50\u306e div.target *\/\r\n:where(div.target) { margin-top: 6px; padding: 6px 8px; background: #e8e8e8; border-radius: 4px; font: 700 14px\/1.4 sans-serif; color: #333; }\r\n:where(.box &gt; div.target) { margin-top: 0; }\r\n\r\n\/* \u76ee\u5370\uff08\u9752\u3044\u70b9\u7dda = .christina\u3001\u8584\u3044 = .is-skip\uff09 *\/\r\n.christina { outline: 2px dashed #1e6fff; outline-offset: -4px; }\r\n.is-skip { opacity: .35; }\r\n\r\n\/* \u25bc \u5bfe\u8c61\u3092\u8d64\u304f\u3059\u308b *\/\r\n.target:has(~.christina) { background: red; }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n  &lt;ul class=&quot;shelf-wrapper&quot; data-cols=&quot;9&quot;&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2460&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2461&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2462&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2463&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2464&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2465&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2466&lt;\/li&gt;\r\n    &lt;li class=&quot;target christina&quot;&gt;\u2467&lt;\/li&gt;\r\n    &lt;li class=&quot;target&quot;&gt;\u2468&lt;\/li&gt;\r\n  &lt;\/ul&gt;&lt;!-- \/\/\/.shelf --&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\" title=\".christina \u3088\u308a\u524d\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\"><\/iframe>\r\n\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n<hr class=\"separator mx-auto mt-3r\" \/>\r\n\r\n<h2 class=\"fz-xl\">\u95a2\u9023\u8a18\u4e8b<\/h2>\r\n\r\n<a href=\"https:\/\/code-plus.jp\/gp\/nth-of-type-12913\/\" class=\"linkbox my-1.5r\">\r\n<strong class=\"linkbox-title fz-md\">nth-\u7cfb\u30bb\u30ec\u30af\u30bf\u306e\u5b9f\u4f8b\u307e\u3068\u3081\uff5c:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of\u69cb\u6587 \u307e\u3067 | CODE PLUS\uff08\u30b3\u30fc\u30c9\u30d7\u30e9\u30b9\uff09<\/strong>\r\n<picture class=\"linkbox-thumbnail\">\r\n<img decoding=\"async\" width=\"300\" height=\"200\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/ec7482348bf095c3682cdeabd5682bad-4.jpg?ver=20261113205050\" alt=\"nth-\u7cfb\u30bb\u30ec\u30af\u30bf\u306e\u5b9f\u4f8b\u307e\u3068\u3081\uff5c:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of\u69cb\u6587 \u307e\u3067 | CODE PLUS\uff08\u30b3\u30fc\u30c9\u30d7\u30e9\u30b9\uff09\" loading=\"lazy\" \/>\r\n<\/picture>\r\n<span class=\"linkbox-excerpt\">\u300c\u6700\u521d\u306e\u8981\u7d20\u3060\u3051\u30b9\u30bf\u30a4\u30eb\u3092\u5909\u3048\u305f\u3044\u300d\u300c\u6700\u5f8c\u306e3\u3064\u3060\u3051\u30de\u30fc\u30b8\u30f3\u3092\u306a\u304f\u3057\u305f\u3044\u300d\u2014\u2014\u3053\u3046\u3044\u3063\u305f\u4f4d\u7f6e\u30d9\u30fc\u30b9\u306e\u6307\u5b9a\u306fCSS\u3067\u3088\u304f\u66f8\u304f\u66f8\u304d\u65b9\u3067\u3059\u3002:nth-of-type() \u306e\u57fa\u672c\u304b\u3089\u3001:nth-child \u306e of \u69cb\u6587\u307e\u3067\u3092\u6574\u7406\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u30bb\u30ec\u30af...\r\n&emsp;<u class=\"linkbox-more\">\u7d9a\u304d\u3092\u8aad\u3080<\/u>\r\n<\/span>\r\n<\/a>","protected":false},"excerpt":{"rendered":"\uff1anth-of-type\u30fb:nth-last-of-type \u306e\u5f0f\u306e\u8aad\u307f\u65b9\u304b\u3089\u3001:is() \/ :not() \/ :has() \u3092\u4f7f\u3063\u305f\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u4f4d\u7f6e\u9078\u629e\u307e\u3067\u7db2\u7f85\u3002\u300c\u6700\u521d\u3068\u6700\u5f8c\u4ee5\u5916\u300d\u306e\u8907\u6570\u306e\u66f8\u304d\u65b9\u3068\u8a73\u7d30\u5ea6\u306e\u6bd4\u8f03\u3082\u53ce\u9332\u3002CSS\u8a2d\u8a08\u306e\u5b9f\u52d9\u306b\u5f79\u7acb\u3064\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9","protected":false},"author":1,"featured_media":12967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7],"tags":[877,876,875,874,873,872,871,870,448,323,80,81],"group":[],"pg":[],"class_list":["post-16045","post","type-post","status-publish","format-standard","has-post-thumbnail","category-html-css","tag-877","tag-not","tag-has","tag-nth-child","tag-nth-of-type","tag-872","tag-871","tag-nth-last-of-type","tag-is","tag-323","tag-80","tag-css"],"acf":[],"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/16045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=16045"}],"version-history":[{"count":10,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/16045\/revisions"}],"predecessor-version":[{"id":16094,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/16045\/revisions\/16094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media\/12967"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=16045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=16045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=16045"},{"taxonomy":"group","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/group?post=16045"},{"taxonomy":"pg","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pg?post=16045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}