방법 - 마우스 오버 시 확대/축소
CSS로 마우스를 가져갈 때 요소를 확대/축소/크기 조정하는 방법을 알아보세요.
마우스 오버 시 확대
녹색 상자 위로 마우스를 가져갑니다.
호버를 확대하는 방법
예시
<style>
.zoom {
padding: 50px;
background-color: green;
transition: transform .2s; /*
Animation */
width: 200px;
height:
200px;
margin: 0 auto;
}
.zoom:hover {
transform:
scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside
of the viewport) */
}
</style>
<div class="zoom"></div>
팁: 요소의 크기를 조정하는 방법에 대해 자세히 알아보려면 CSS 변환 자습서 로 이동하세요 .