以下のように:has()
を使用することで指定した数以上子要素が存在する場合にのみスタイルを適用できます。
ul:has(> :nth-child(N)) li { }
2つ以上ある場合にスタイルを適用するには以下のようにします。
ul:has(> :nth-child(2)) li { }
Go to list of users who liked
More than 1 year has passed since last update.
以下のように:has()
を使用することで指定した数以上子要素が存在する場合にのみスタイルを適用できます。
ul:has(> :nth-child(N)) li { }
2つ以上ある場合にスタイルを適用するには以下のようにします。
ul:has(> :nth-child(2)) li { }
Register as a new user and use Qiita more conveniently
Go to list of users who liked