답변 3개 / 댓글 1개
채택된 답변
+20 포인트
Copy
<div class="image-box">
<div class="image"></div>
</div>
<style>
.image-box{
width:300px;
overflow:hidden;
}
.image {
width:300px;
height:200px;
background: url("https://picsum.photos/300/200/");
background-position:center;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.image:hover {
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
-ms-transform: scale(1.2); /* IE 9 */
transform: scale(1.2);
}
</style>
이게 이미지 확대하는 애니메이션인데
.image:hover { 여기에 hover을 빼면
이미지가 첨부터 확대되서 나옵니다 이런걸 찾으시나요?
답변을 작성하려면 로그인이 필요합니다.
예를 들면 https://www.ilbaeumteo.net/ 이곳처럼입니다!