두 개의 콜론
::으로 표현, 요소의 특정한 부분에 존재하며 정해진 기능을 하는 가상 요소를 선택
.example1 h2::before {
content: "※";
}.example2 h2::after {
content: "!!";
}.example1 h2::after { // 이미지 삽입, 크기는 자동으로 작아짐
content: url(https://blah.blah/);
}
.example1 h2::after { // 동적 요소 삽입, 자신의 속성에서 data 속성을 찾아 값을 표시
content: attr(data);
}.example3 li::marker {
color: red;
}
.example4 input::placeholder {
text-align: center;
color: darkgray;
font-weight: bold;
}
.example5 h2::first-letter {
color: red;
}.example6 h2::first-line {
color: red;
}