Content  편집

개요

이 속성은 요소의 앞(:before)과 뒤(:after)에 생성할 내용을 지정한다.

정의

Content설명
[ <문자열?> | <uri?> | <counter?> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
기본값빈 문자열
적용대상:before, :after 가상 요소
상속안됨
백분율사용 불가
미디어all?

설명
문자열글자를 지정한다.
uri외부 경로를 지정한다.
counter자동으로 번호를 추가하도록 지정한다.
open-quote인용 부호의 시작 부호를 지정한다. (예: “, ‘)
close-quote인용 부호의 종료 부호를 지정한다. (예: ”, ’)
no-open-quote인용 부호의 시작 부호를 지정하지 않는다.
no-close-quote인용 부호의 종료 부호를 지정하지 않는다.
attr(X)요소의 속성(attribute) X의 값을 지정한다.
inherit부모 요소의 값을 상속하도록 지정한다.
  • 'display" 속성으로 생성된 내용이 block, inline, list-item 형식으로 출력되도록 지정할 수 있다.
  • 'run-in' 또는 'compact' 요소는 'inline' 형식의 한 :before 가상 요소를 갖는다.
  • 'run-in' 또는 'compact' 요소는 'inline' 형식의 한 :after 가상 요소를 갖는다.
  • 'run-in' 또는 'compact' 요소는 'block' 형식의 한 :before 가상 요소를 갖는다.
  • 'run-in' 또는 'compact' 요소는 'inline' 형식의 한 :after 가상 요소를 갖는다.
  • 'run-in' 또는 'compact' 요소 다음의 요소는 'block' 형식의 :before를 갖는다.
  • 'run-in' 또는 'compact' 요소 다음의 요소는 'inline' 형식의 :before를 갖는다.

예제

브라우저 호환성

IE6?IE7?FF2?Op9?
none미지원미지원미지원미지원
normal미지원미지원지원지원
(String)미지원미지원지원지원
(URI)미지원미지원지원지원
counter(<counter>)미지원미지원지원불안정
counter(<counter>, <list-style-type>)미지원미지원지원불안정
counters(<counter>, <string>)미지원미지원지원불안정
counters(<counter>, <string>, <list-style-type>)미지원미지원지원불안정
attr(<attr>)미지원미지원지원지원
open-quote미지원미지원지원지원
close-quote미지원미지원지원지원
no-open-quote미지원미지원지원지원
no-close-quote미지원미지원지원지원
inherit미지원미지원지원지원

 
Be Friend~! Be Friend~!