IT_susu
content 속성 본문
normal | Default value. Sets the content, if specified, to normal, which default is "none" (which is nothing) | |
none | Sets the content, if specified, to nothing | |
counter | Sets the content as a counter | |
attr(attribute) | Sets the content as one of the selector's attribute | |
string | Sets the content to the text you specify | |
open-quote | Sets the content to be an opening quote | |
close-quote | Sets the content to be a closing quote | |
no-open-quote | Removes the opening quote from the content, if specified | |
no-close-quote | Removes the closing quote from the content, if specified | |
url(url) | Sets the content to be some kind of media (an image, a sound, a video, etc.) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
- counter
content요소가 들어가는 영역, 즉 ::before나 ::after를 떼고 난 선택자에 counter-increment: counterName; 을 붙인다.
가상요소를 붙인 곳에 content: counter(counterName);
1이 아닌 다른 숫자로 카운팅을 시작하고 싶으면 해당 영역을 선택하고 counter-reset: counterName startNumber;
증가값이 1이 아닌 경우, counter-increment: counterName incrementNumber;
counters도 업데이트 필요.
Comments