영어공부

CSS Pseudo-elements

2020. 1. 20. 14:05
목차
  1. What are Pseudo-Elements?
  2. The ::first-line Pseudo-element
  3. The ::first-letter Pseudo-element
  4. Multiple Pseudo-elements
  5. CSS - The ::before Pseudo-element
  6. CSS - The ::after Pseudo-element

What are Pseudo-Elements?

A CSS pseudo-element is used to style specified parts of an element.

For example, it can be used to:

  • Style the first letter, or line, of an element
  • Insert content before, or after, the content of an element

수도-요소는 무엇일까?

css pseudo-element 요소는 요소의 구체적인 부분을 스타일하기 위해서 사용되어진다.

예를든다면, 이것은 요런식으로 사용되어질 수 있다.

요소의 첫문자 혹은 첫줄 스타일 하기

요소 내용의 뒤나 앞에 내용 삽입

 

 

Notice the double colon notation - ::first-line versus :first-line

The double colon replaced the single-colon notation for pseudo-elements in CSS3. This was an attempt from W3C to distinguish between pseudo-classes and pseudo-elements.

The single-colon syntax was used for both pseudo-classes and pseudo-elements in CSS2 and CSS1.

For backward compatibility, the single-colon syntax is acceptable for CSS2 and CSS1 pseudo-elements.

 

 

주의 What are Pseudo-Elements?

A CSS pseudo-element is used to style specified parts of an element.

 

For example, it can be used to:

 

Style the first letter, or line, of an element

Insert content before, or after, the content of an element

수도-요소는 무엇일까?

 

css pseudo-element 요소는 요소의 구체적인 부분을 스타일하기 위해서 사용되어진다.

 

예를든다면, 이것은 요런식으로 사용되어질 수 있다.

 

요소의 첫문자 혹은 첫줄 스타일 하기

 

요소 내용의 뒤나 앞에 내용 삽입

 

 

Notice the double colon notation - ::first-line versus :first-line

 

The double colon replaced the single-colon notation for pseudo-elements in CSS3. This was an attempt from W3C to distinguish between pseudo-classes and pseudo-elements.

 

The single-colon syntax was used for both pseudo-classes and pseudo-elements in CSS2 and CSS1.

 

For backward compatibility, the single-colon syntax is acceptable for CSS2 and CSS1 pseudo-elements.

 

 

더블 클론인것을 주의하라, :first-line 과 대조적으로 ::first-line

 

css3 에서 수도요소로서 더블 클론은 싱글 클론표현으로 대체된다.

수도 클래스와 수도요소를 구분하기 위해서 w3c로부터 시도된 것이다.

싱글 클론 문법은 css2 와 css1안에서 수도 요소와 클래스를 위해 모두 사용되어진다.

이전 버전과의 호환성을 위해 싱글 클론 문법은 css2와 css1에서 받아 드려진다.

 

 

The ::first-line Pseudo-element

The ::first-line pseudo-element is used to add a special style to the first line of a text.

The following example formats the first line of the text in all <p> elements:

 

::first-line 수도 요소는 텍스트의 첫라인의 구체적인 스타일을 추가하기 위해서 사용되어진다.

다음의 예제는 모든 <p> 요소의 첫번째 텍스트 라인을 포맷한다.

 

The ::first-letter Pseudo-element

The ::first-letter pseudo-element is used to add a special style to the first letter of a text.

The following example formats the first letter of the text in all <p> elements: 

 

::first-letter 수도 요소는 텍스트의 첫문자를 스타일을 추가하기 위해서 사용되어진다.

다음의 예제는 모든 <p> 요소의 첫 문자의 포맷팅한다.

 

Multiple Pseudo-elements

Several pseudo-elements can also be combined.

In the following example, the first letter of a paragraph will be red, in an xx-large font size. The rest of the first line will be blue, and in small-caps. The rest of the paragraph will be the default font size and color:

 

여러개 수도 요소

몇몇의 수도 요소는 결합되어질 수 있다.

다음의 따라오는 예제에서 단락의 첫문자는 빨간색일것이고, 나머지 첫줄의 나머지는 파란색일것이다.

단락의 나머지는 기본적인 폰트와 사이즈일 것이다.

 

CSS - The ::before Pseudo-element

The ::before pseudo-element can be used to insert some content before the content of an element.

The following example inserts an image before the content of each <h1> element:

 

::before 수도 요소는 요소의 내용물의 전에 어떤 내용물을 삽입하기 위해서 사용되어진다.

다음의 예제는 각각의 <h1> 내용 전에 이미지를 삽입한다.

 

CSS - The ::after Pseudo-element

The ::after pseudo-element can be used to insert some content after the content of an element.

The following example inserts an image after the content of each <h1> element:

 

after 수도 요소는 요소의 내용물 뒤에 조금의 내용물을 삽입하기 위해서 사용되어진다.

다음의 예제는 각각의 h1 요소 뒤에 이미지를 삽입한다.

'영어공부' 카테고리의 다른 글

CSS Navigation Bar  (0) 2020.01.20
CSS Opacity / Transparency  (1) 2020.01.20
CSS Pseudo-classes  (0) 2020.01.20
CSS Combinators  (0) 2020.01.20
CSS Layout - Horizontal & Vertical Align  (0) 2020.01.19
  1. What are Pseudo-Elements?
  2. The ::first-line Pseudo-element
  3. The ::first-letter Pseudo-element
  4. Multiple Pseudo-elements
  5. CSS - The ::before Pseudo-element
  6. CSS - The ::after Pseudo-element
'영어공부' 카테고리의 다른 글
  • CSS Navigation Bar
  • CSS Opacity / Transparency
  • CSS Pseudo-classes
  • CSS Combinators
jeongsu
jeongsu
박정수가 공부한 자료를 남기기 위한 블로그
jeongsu
Park_jeong_su
jeongsu
전체
오늘
어제
  • 분류 전체보기 (255)
    • 제조산업 (11)
      • MES (8)
      • 반송 (0)
      • ERP (1)
    • dev (93)
      • 스프링 (2)
      • 데이터베이스 (20)
      • 프로그래밍 (6)
      • 알고리즘 (3)
      • Network (2)
      • trouble shooting (5)
      • 개인 프로젝트 (9)
      • 기타 (46)
    • 박정수 (85)
      • 자기소개 (1)
      • diary & 일상생활 (77)
      • 해외생활 - 중국편 (2)
      • 회고 (4)
    • 영어공부 (51)
    • 유용한 사이트 모음집 (13)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • 스마트팩토리 전망
  • MES 개발자
  • spring
  • MES 개발
  • 협업프로그램
  • MES 개발자를 하면 안되는 이유
  • vscode
  • ERP
  • 비트코인
  • MES의 어려움
  • RMS란
  • 회고
  • recipe management system
  • 본질이 존재할까?
  • oracle
  • MES 도망쳐
  • w3cSchool
  • mes
  • Gin
  • java
  • coffee-bytes
  • MES란
  • tutorial
  • JPA
  • MES 전망
  • MES 란
  • mermaid js
  • 배움의 목적
  • 어차피 뒤짐
  • 에임시스템

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.1.4
jeongsu
CSS Pseudo-elements
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.