최신 웹 개발 튜토리얼
×

CSS 참고

CSS 참고 CSS 선택기 CSS 함수 CSS 참고 청각 CSS 웹 안전 글꼴 CSS 애니메이션 CSS 단위 CSS PX-EM 변환기 CSS 그림 물감 CSS 색 값 CSS3 브라우저 지원

CSS 속성

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-shadow box-sizing caption-side clear clip color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-size font-size-adjust font-stretch font-style font-variant font-weight hanging-punctuation height justify-content @keyframes left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width nav-down nav-index nav-left nav-right nav-up opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin position quotes resize right tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi vertical-align visibility white-space width word-break word-spacing word-wrap z-index



 

CSS ::before Selector


각각의 내용 이전에 텍스트 삽입 <p> 요소를 :

p::before {
    content: "Read this: ";
}
»그것을 자신을 시도

"Try it Yourself" 아래의 예.


정의 및 사용

선택하기 전에 : 각 선택의 내용 이전에 뭔가를 삽입 element(s) .

사용 내용 삽입 할 내용을 지정하는 속성입니다.

사용 후 ::을 콘텐츠 후 뭔가를 삽입하는 선택.

번역: CSS2

브라우저 지원

표의 수치는 완전히 선택기를지지하는 제 브라우저 버전을 지정한다.

선택자
::before 4.0 9.0
8.0에서 부분
3.5 3.1 7.0
4.0 부분

참고 : IE8과 오페라 4-6는 기존의 단일 콜론 CSS2 문법 지원 (:before) . 최신 버전은 표준, 이중 콜론 CSS3 구문 지원 (::before) .

참고 : 경우 : IE8에서 작업하기 전에 <! DOCTYPE>를 선언해야합니다.


CSS 구문

::before {
    css declarations ;
}

예

더 예


모든 전에 내용 삽입 <p> 요소의 컨텐츠를, 그리고 삽입 된 내용의 스타일 :

p::before {
    content: "Read this -";
    background-color: yellow;
    color: red;
    font-weight: bold;
}
»그것을 자신을 시도

관련 페이지

CSS 자습서 : CSS 의사 요소

CSS 선택기 참조 : CSS :: 선택 후