저는 CSS 전환 효과로 놀아 왔습니다. 모두 작동하지만, :hover
이외의 다른 속성을 시도했습니다.호버 제안 이외의 CSS 전환 효과 onload
예를 들어, div에 onload를 전환하는 무언가를 찾고 있는데, 페이지에있는 상태에서 아래로 스크롤하면 특정 div에 도달하면 전환 속성이 적용됩니다.
.box {
border-style: solid;
border-width: 1px;
display: block;
width: 760px;
height: 760px;
background-image: url("1.png");
-webkit-transition: width 2s, height 2s, background-color 2s, -webkit-transform 2s;
transition: width 2s, height 2s, background-color 2s, transform 2s;
padding-bottom:20px;
}
.box:hover {
background-image: url("1.png");
width: 760px;
height: 760px;
-webkit-transform: rotate(180deg);
transform: rotate(-2deg);
padding-bottom:20px;
}
당신은 JS를 사용할 수 있습니다! –