CSS

[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-start-style 속성 -
css CSS - min-block-size 속성 -
css CSS - min-inline-size 속성 -
outline CSS - outline-offset 속성 -
box CSS - margin-block-start 속성 -
box CSS - margin-inline-end 속성 -
scroll CSS - scroll-padding 속성 -
box CSS - margin-inline-start 속성 -
css CSS - offset-rotate 속성 -
css CSS - mask-size 속성 -
css CSS - mask-image 속성 -
border CSS - border-start-end-radius 속성 -
css CSS - box-reflect 속성 (비표준) - 요소의 반사체 생성 (= box-reflect속성 = 박…
border CSS - border-block-style 속성 - 블락방향 테두리 모양 지정 (= border-block…
css CSS - max-inline-size 속성 -
5/35
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드 1
제작의뢰
Q&A
커뮤니티 3
웹유틸
회원센터
홈짱닷컴 PC버전 로그인