[HTML/CSS] 버튼에 HOVER 속성을 이용하여 에니메이션을 넣어보자

728x90
반응형

html

			<div class = "on">온라인 판매처
			<div class = "online"><a href = "" class = "bt naver">NAVER</a></div>
				<div class = "online"><a href = "" class = "bt eleven">11ST</a></div>
				<div class = "online"><a href = "" class = "bt auction">AUCTION</a></div>
				<div class = "online"><a href = "" class = "bt coupang">COUPANG</a></div>
				<div class = "online"><a href = "" class = "bt gmarket">G MARKET</a></div>
			</div>

css

.bt, .bt a{
	text-decoration: none;
	width: 100%;
	height: auto;
	padding-top : 1%;
	padding-bottom: 1%;
	position: relative;
	display: block;
outline: #333 solid 4px;
	font-size: 0.7em;
	
	color: #fff;
	background-color:#000;;
	border: 4px solid # #C1C1C1;
	font-weight: normal;;
}

.bt:hover{color: #000;  -webkit-transition: all .7s ease;  -moz-transition: all .7s ease;  -o-transition: all .7s ease;
  transition: all .7s ease;	box-shadow: 500px 0 0 0 rgba(255, 255, 255, 1) inset; 			outline: dotted 0px #fff;}

이렇게 하면 아래처럼 나온다

온라인 판매처
728x90
반응형

'교육 > HTML+CSS' 카테고리의 다른 글

[CSS] CALC  (5) 2022.11.22
[HTML/CSS] 슬라이딩 애니메이션 : KEYFRAMES  (8) 2022.11.14
[CSS] CSS로 동그라미를 그려보자.  (4) 2022.10.14
[CSS] 높이 100%  (2) 2022.10.12
[HTML] smooth-scroll  (0) 2022.10.12