:not疑似クラスセレクタ
- HTML
- CSS
- JavaScript
- jQuery
:not と :first-child を組み合わせて「一番最初の要素以外」を指定しています。
jQuery Code
$(function() {
$("li:not(:first-child)").css("color", "hotpink");
});
:not と :first-child を組み合わせて「一番最初の要素以外」を指定しています。
$(function() {
$("li:not(:first-child)").css("color", "hotpink");
});