CSS

[selector] CSS - ::selection 가상선택자 - 사용자가 선택한 영역 (= ::selection선택자) (가상요소, IE9)

::selection 예제

 

<style>

::-moz-selection { /* Firefox */

  color: red;

  background: yellow;

}


::selection {

  color: red;

  background: yellow;

}

</style>


<h1>홈짱닷컴</h1>

<p>Homzzang.com</p>

<div>홈페이지 제작관리 + 서버관리</div>

 

결과보기


 

::selection 정의

 

요소 내에서 사용자가 더블클릭 또는 드래그해서 선택한 부분을 의미.

 


 

1.

::selection 선택자엔 아래 4가지 속성만 사용 가능.

color, background, cursor, outline 

 

2.

IE9 이상 주요 최신브라우저 모두 지원.

 

 

 

::selection 구문

 

::selection { css declarations; }

 


 

[특정선택자에 적용할 때]

selector::selection { css declarations; }

 



분류 제목
selector CSS - :last-child 가상선택자 - 그 부모의 마지막자식요소인 지정요소 (= :last-child…
selector CSS - :last-of-type 가상선택자 - 지정타입 마지막자식요소 (순서선택자,타입선택자, IE9)
selector CSS - :nth-child(n) 가상선택자 ★ - 그 부모의 n번째 자식요소 (=nth-child선택자 …
selector CSS - :nth-last-child(n) 가상선택자 ★★★ - (그 부모의) 마지막n번째 자식요소 (= …
selector CSS - :nth-last-of-type(n) 가상선택자 - 타입마지막n번째 자식요소 (순서선택자,,타입…
selector CSS - :nth-of-type(n) 가상선택자 - 지정타입n번째 자식요소 (순서선택자,타입선택자, IE9…
selector CSS - :only-of-type 가상선택자 - 타입유일 자식요소 (= 유일타입 자식요소) [유일선택자|타…
selector CSS - :only-child 가상선택자 - 그 부모의 유일자식요소 (유일선택자, IE9)
selector CSS - :optional 가상선택자 - 선택입력요소 (= required 속성없는 요소, IE10)
selector CSS - :out-of-range 가상선택자 - 지정범위밖값 갖는 요소 선택 (=아웃어브레인지선택자, IE…
selector CSS - :read-only 가상선택자 - 읽기전용요소 (= readonly속성있는요소 = :read-on…
selector CSS - :read-write 가상선택자 - 읽고쓰기가능요소 (= readonly속성없는요소, IE13)
selector CSS - :required 가상선택자 - 필수입력요소 (= required속성있는요소, IE10)
selector CSS - :root 가상선택자 - 웹문서root요소 선택. (= 루트선택자, IE9)
selector CSS - :target 가상선택자 - 내부링크목적지요소 (= :target선택자 = 타겟선택자 = 목적지선…
18/33
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인