CSS3 전환 + 변환 > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

CSS3 전환 + 변환 정보

CSS CSS3 전환 + 변환

본문

CSS3 전환 + 변환


다음 예제에서는 전환 효과에 변형을 추가합니다.


div {

    -webkit-transition: width 2s, height 2s, -webkit-transform 2s; /* Safari */

    transition: width 2s, height 2s, transform 2s;

}



<!DOCTYPE html>

<html>

<head>

<style> 

div {

    width: 100px;

    height: 100px;

    background: red;

    -webkit-transition: width 2s, height 2s, -webkit-transform 2s; /* Safari */

    transition: width 2s, height 2s, transform 2s;

}


div:hover {

    width: 300px;

    height: 300px;

    -webkit-transform: rotate(180deg); /* Safari */

    transform: rotate(180deg);

}

</style>

</head>

<body>


<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>


<div></div>


<p>Hover over the div element above, to see the transition effect.</p>


</body>

</html>


추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로