• 회원가입
  • 로그인
  • 구글아이디로 로그인

[selector] CSS - :autofill 가상선택자 - 브라우저 자동완성 채우기로 입력된 요소 선택 (= :autofill선택자 = 오토필선택자)

목차
  1. :autofill 예제 - 브라우저 자동완성 채우기로 입력된 요소 선택
  2. :autofill 정의
  3. :autofill 구문

 

:autofill 예제 - 브라우저 자동완성 채우기로 입력된 요소 선택

 

<style>

input:autofill {

  border: 2px solid red;

}

</style>


<form>

<label for="name">이름: </label><br>

<input id="name" name="name" type="text" autocomplete="name" /><br>


<label for="email">이메일: </label><br>

<input id="email" name="email" type="email" autocomplete="email" /><br>


<label for="home-address">주소:</label><br>

<input name="address" type="text" autocomplete="street-address"><br>


<label for="country">국적: </label><br>

<input id="country" name="country" type="text" autocomplete="country-name" />

</form>

 

결과보기

 

:autofill 정의

 

autocomplete 속성 가진 <input> 요소를 브라우저 자동완성 채우기로 입력시 해당 INPUT 요소를 선택하는 선택자.

 


PS.

  • 주의: 자동완성 채우기로 채운 값을 사용자가 수정하면 더 이상 이 선택자의 영향을 받지 않음.
  • CSS2
  • IE 제외한 주요 최신 브라우저 모두 지원.

 

 

:autofill 구문

 

:autofill { CSS 선언 }

 

 


분류 제목
border CSS - border-inline-width 속성 -
scroll CSS - scroll-margin-right 속성 -
css CSS - rotate 속성 - 요소 회전 (= rotate속성 = 로테이트속성)
border CSS - border-block-start-width 속성 -
border CSS - border-inline-style 속성 -
scroll CSS - scroll-margin-inline-end 속성 -
scroll CSS - scroll-margin-block-start 속성 -
css CSS - break-before 속성 - 지정요소 앞에서 (페이지중단/컬럼중단/영역중단) 발생 여부 지정 …
scroll CSS - scroll-padding-left 속성 -
border CSS - border-inline-color 속성 -
border CSS - border-start-start-radius 속성 -
css CSS - place-self 속성 - 그리드셀 내 개별 아이템 (수직/수평) 정렬 (= place-self…
scroll CSS - scroll-margin-block-end 속성 -
css CSS - hyphens 속성 - 긴 텍스트 단어에서 하이픈 표시 방법 지정 (= hyphens속성 = 하이…
css CSS - offset-path 속성 -
border CSS - border-inline-start-width 속성 -
scroll CSS - scroll-snap-stop 속성 -
border CSS - border-block-end-width 속성 - 블락방향 끝테두리 너비(=두께) 지정 (= bo…
font CSS - font-kerning 속성 - 문자 모양 고려해, 문자 사이 간격 지정 (= font-kerni…
scroll CSS - scroll-snap-align 속성 -
6/27
목록
찾아주셔서 감사합니다. Since 2012