1
상단에 20px를 추가 한 절대적으로 위치한 div 위에 마우스를 올리면 전환 시간을 추가하려고 시도합니다. 호버 효과가 작동하지만 전환 시간이 적용되지 않습니다.상대 위치 지정을 변경할 때 호버 전이가 작동하지 않습니까?
SCSS :
div {
position: relative;
margin: 0 auto;
height: 400px;
width: 300px;
background-color: grey;
transition: all 5s;
&:hover {
top: 20px;
}
}
CodePen : Top 속성의 https://codepen.io/KevinM818/pen/YYZqKY