IT_susu

content 속성 본문

마크업/CSS 이론

content 속성

고베베 2019. 1. 6. 14:36


normalDefault value. Sets the content, if specified, to normal, which default is "none" (which is nothing)Try it »
noneSets the content, if specified, to nothingTry it »
counterSets the content as a counterTry it »
attr(attribute)Sets the content as one of the selector's attributeTry it »
stringSets the content to the text you specifyTry it »
open-quoteSets the content to be an opening quoteTry it »
close-quoteSets the content to be a closing quoteTry it »
no-open-quoteRemoves the opening quote from the content, if specifiedTry it »
no-close-quoteRemoves the closing quote from the content, if specifiedTry it »
url(url)Sets the content to be some kind of media (an image, a sound, a video, etc.)Try it »
initialSets this property to its default value. Read about initial
inheritInherits 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