요소의 특정 상태를 선택하는 데 사용
.example1 ul li:hover {
color: red;
}
.example2 input:focus {
color: red;
}
.example3 input:active {
color: red;
}
.example4 ul li:first-child { // child
color: red;
}
.example4 ul li:first-of-type {// of-type
color: red;
}
.example5 ul li:last-child { // child
color: red;
}
.example5 ul li:last-of-type { // of-type
color: red;
}
.example6 ul li:nth-child(2) { // child
color: red;
}
.example6 ul li:nth-of-type(2) { // of-type
color: red;
}
.example9 ul li:not(first-child) {
color: red;
}