Search

CSS 선택자

Created
2021/07/02 06:43
Tags

CSS 선택자

CSS에서 선택기는 스타일을 지정할 요소를 선택하는 데 사용되는 패턴입니다.
CSS 선택기 테스터 를 사용 하여 다양한 선택기를 시연하십시오.
Search
선택자 리스트
Selector
Example
Example description
.class1.class2
Selects all elements with both name1 and name2 set within its class attribute
.class1 .class2
Selects all elements with name2 that is a descendant of an element with name1
Selects the element with id="firstname"
Selects all elements
Selects all <p> elements
Selects all <p> elements with class="intro"
Selects all <div> elements and all <p> elements
Selects all <p> elements inside <div> elements
Selects all <p> elements where the parent is a <div> element
Selects the first <p> element that is placed immediately after <div> elements
Selects every <ul> element that is preceded by a <p> element
Selects all elements with a target attribute
Selects all elements with target="_blank"
Selects all elements with a title attribute containing the word "flower"
Selects all elements with a lang attribute value starting with "en"
Selects every <a> element whose href attribute value begins with "https"
Selects every <a> element whose href attribute value ends with ".pdf"
Selects every <a> element whose href attribute value contains the substring "w3schools"
Selects the active link
Insert something after the content of each <p> element
Insert something before the content of each <p> element
Selects every checked <input> element
Selects the default <input> element
Selects every disabled <input> element
Load more