본문 바로가기

CSS/learned_it_today

button hover했을 때 아래줄 생기게 하기

button::after {
  content: "";
  width: 0;
  height: 2px;
  background-color: #0066ff;
  position: absolute;
  bottom: 0;
  left: 0;
  transition: width 250ms ease-in;
}

button:hover::after {
  width: 100%;
}

'CSS > learned_it_today' 카테고리의 다른 글

reset css  (0) 2020.10.27
:root 색상 정리  (0) 2020.10.27
button, input, textarea의 font-family  (0) 2020.10.26
열거한 아이템들 사이 CSS로 ·(점) 넣기  (0) 2020.10.26
.sr-only 스타일링  (0) 2020.10.26