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

[css] CSS - 구글 로그인 포커스 애니 효과 (Google Logn Foucs Animation Effect) ※ 다중 가상선택자 예제

 

 

<style>

body{

  font-family: sans-serif;

}


.input_group{

  position: relative;

  padding-top: 13px;

}


.input_group input{

  border: 1px solid lightgrey;

  border-radius: 5px;

  outline: none;

  min-width: 250px;

  padding: 15px 20px;

  font-size: 16px;

  transition: all .1s linear;

  -webkit-transition: all .1s linear;

  -moz-transition: all .1s linear;

  -webkit-appearance:none;

}


.input_group input:focus{

  border: 2px solid #3951b2;

}


.input_group input::placeholder{

  color:transparent;

}


.input_group label{

  pointer-events: none;

  position: absolute;

  top: calc(50% - 8px);

  left: 15px;

  transition: all .1s linear;

  -webkit-transition: all .1s linear;

  -moz-transition: all .1s linear;

  background-color: white;

  padding: 5px;

  box-sizing: border-box;

}


.input_group input:required:invalid + label{

  color: red;

}

.input_group input:focus:required:invalid{

  border: 2px solid red;

}

.input_group input:required:invalid + label:before{

  content: '*';

}

.input_group input:focus + label,

.input_group input:not(:placeholder-shown) + label{

  font-size: 13px;

  top: 0;

  color: #3951b2;

}

</style>


<div class="input_group">

  <input type="text" placeholder=" "/>

  <label>아이디</label>

</div>

<br/>

<div class="input_group">

  <input type="password" placeholder=" " required/>

  <label>비밀번호</label>

</div>

 

결과보기

tofanelli 님 https://codepen.io/tofanelli/pen/Ormgrz



분류 제목
css CSS - place-content 속성(C) - (flex/grid) 레이아웃에서 (수직정렬/수평정렬) 일…
scroll CSS - scroll-padding-inline 속성 -
scroll CSS - scroll-padding-inline-end 속성 -
grid CSS - grid-auto-flow 속성(C) - 그리드 컨테이너 채우는 방식 지정 (= grid-auto…
grid CSS - grid-row-gap 속성 - (※ row-gap으로 이름 바뀜.) 그리드 행 간격 지정 (= …
position CSS - overflow-x 속성 - 수평방향으로 넘치는 내용 처리 방법 지정 (= overflow-x속성…
scroll CSS - scroll-margin 속성 - 스크롤마진 일괄 지정 (= scroll-margin속성 = 스크…
css CSS - isolation 속성 - 요소가 새 스택(stack: 쌓음) 콘텐츠를 생성해야 하는지 여부 지정…
grid CSS - grid-auto-columns 속성(C) - 그리드 열 너비 일괄 지정 (= grid-auto-…
scroll CSS - scroll-behavior 속성 ★ - 스크롤박스 내 동일 페이지 링크 이동 시 부드럽게 이동할…
background CSS - background-position-x 속성 - 배경이미지 x축위치(=수평위치) 설정 (= bac…
grid CSS - grid-row-start 속성(I) - 그리드 아이템 행 시작 위치 및 확장 지정 (= grid…
grid CSS - grid-row 속성(I) - 그리드 아이템 행 '시작위치와 끝위치 / 크기확장' 지정 (= gr…
box CSS - box-decoration-break 속성 - 요소 상자 깨지는 방식 지정 (= box-decor…
image CSS - image-rendering 속성 - 크기 조정 가능 이미지의 렌더링 방식 지정 (= image-…
grid CSS - grid-auto-rows 속성(C) - 그리드 행 높이 일괄 지정 (= grid-auto-row…
scroll CSS - scrollbar-color 속성 - 스크롤바 색상 지정 (= scrollbar-color속성 =…
background CSS - background-blend-mode 속성 - 해당요소 각 (배경색/배경미미지)층의 혼합방식 지…
css CSS - accent-color 속성 - 사용자 제어 선택요소의 색상/색깔 지정 (= accent-colo…
grid CSS - grid-template 속성 - 그리드 행열 및 영역 개별 지정 (= grid-template속…
9/27
목록
찾아주셔서 감사합니다. Since 2012