css

속성 선택자(Attribute Selector)

Bittersweet- 2020. 7. 3. 22:51
728x90

태그의 속성으로 요소에 css를 적용.

예시) input 태그의 type이라는 속성으로 css 적용

 

 

<input type='text' value='content'>

<input type='password' value='1234'>

<input type='text' value='disabled content' disabled>

 

1. 속성을 가지고 있는 요소에 css 적용

 

[disabled] { css 적용}

disabled라는 속성을 가진 요소에 css 적용

 

2. 속성의 특정한 value값을 가지고 있는 요소에 css 적용

 

[type=password] { css 적용}

or

[type='password] { css 적용}

password라는 value를 가진 type에 css 적용

'css' 카테고리의 다른 글

Transitions(전환)  (0) 2020.07.04
속성 선택자 with ^, $  (0) 2020.07.03
부정 선택자 NOT  (0) 2020.07.03
NTH OF TYPE  (0) 2020.07.03
가상 클래스 선택자 xxx-child 주의사항  (0) 2020.07.03