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

[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



분류 제목
color CSS - RGBA , HSL , HSLA , opacity - (색상코드)
border CSS - border-right-width 속성 - 테두리우측두께 (= 테두리우측너비 = 테두리오른쪽너비 …
transform CSS - backface-visibility 속성 - 3D요소 뒷면 노출 여부. (= backface-vi…
image CSS - Image Text - (이미지 위에 텍스트 배치/띄우기)
selector CSS - :disabled 가상선택자 - 비활성화 된 요소 선택 (= 실행불능요소 = 작동불능요소 = :d…
transform CSS - perspective-origin 속성 - 3D요소 바라보는 위치 (= perspective-or…
border CSS - border-image-repeat 속성 - 테두리 이미지 반복할지 늘릴지 선택 (= 보더이미지리…
flex CSS - flex-flow 속성(C) ☆ - (flex-direction / flex-wrap) 속성 일괄…
func CSS - clamp() 함수 - 최소값과 최대값 사이의 중간값 반환. (= clamp함수 = 클램프함수)
background CSS - background-clip 속성 - 배경영역 (= background-clip속성 = 백그라운드…
image CSS - Image Modal - (Advanced) - (이미지 모달 띄우기 효과)
flex CSS - flex 속성(I) ☆ - flex-grow, flex-shrink, flex-basis 속성 일…
border CSS - border-top-width 속성 - 테두리상단두께 (= 테두리상단너비 = border-top-…
border CSS - border-top-color 속성 - 테두리상단색상 (= 테두리상단색깔 = border-top-…
selector CSS - :nth-of-type(n) 가상선택자 - 지정타입n번째 자식요소 (순서선택자,타입선택자, IE9…
border CSS - border-left-width 속성 - 테두리좌측두께 (= 테두리좌측너비 = 테두리왼쪽너비 = …
flex CSS - flex-grow 속성(I) ★ - 아이템 너비 증가 (= flex-grow속성 = 플렉스그로속성…
border CSS - border-bottom-color 속성 - 테두리하단색깔 (= 보더바텀컬러속성 = border-…
pagination CSS - 페이징 - 기본 스타일 (Simple Pagination)
border CSS - border-left-color 속성 - 테두리좌측색상 (= 테두리좌측색깔 = 테두리왼쪽색상 = …
15/27
목록
찾아주셔서 감사합니다. Since 2012