렌더링 과정
예시
html
<div class="container">
<div class="box translate">Translate</div>
<div class="box position">Position</div>
</div>
css
.box {
width: 100px;
height: 100px;
background-color: #3498db;
display: flex;
justify-content: center;
align-items: center;
color: white;
cursor: pointer;
}
.translate {
transition: transform 0.3s ease;
}
.translate:hover {
transform: translateY(30px);
}
.position {
position: relative;
transition: top 0.3s ease;
}
.position:hover {
top: 30px;
}
translate 박스
position 박스
출처: