CSS Selector コメントを残す CSS Selectorに関するTIPS :only-child 子要素が1つだけの場合に適用。:first-child:last-childと書くこともできます。 サンプル ul li:only-child { color: red; } :not(:first-child) 最初以外の要素に適用。 サンプル p:not(:first-child) { background-color: #fff; } ツイート