• 회원가입
  • 로그인
  • 구글아이디로 로그인

[animation] CSS - animation-direction 속성 - 애니방향 (= 움직임방향 = 애니메이션디렉션속성, IE10)

animation-direction 예제

 

<style> 

#hz {

  padding:20px 30px;

  width:200px;

  background: red;

  position: relative;

  -webkit-animation: homzzang 5s 2; /* Safari 4.0 - 8.0 */

  -webkit-animation-direction: alternate; /* Safari 4.0 - 8.0 */

  animation: homzzang 5s 2;

  animation-direction: alternate;

}


/* Safari 4.0 - 8.0 */

@-webkit-keyframes homzzang {

  0%   {background: red; left: 0px; top: 0px;}

  25%  {background: yellow; left: 200px; top: 0px;}

  50%  {background: blue; left: 200px; top: 200px;}

  75%  {background: green; left: 0px; top: 200px;}

  100% {background: red; left: 0px; top: 0px;}

}


@keyframes homzzang {

  0%   {background: red; left: 0px; top: 0px;}

  25%  {background: yellow; left: 200px; top: 0px;}

  50%  {background: blue; left: 200px; top: 200px;}

  75%  {background: green; left: 0px; top: 200px;}

  100% {background: red; left: 0px; top: 0px;}

}

</style>


<div id='hz'>홈짱닷컴 Homzzang.com</div>



결과보기

 

 

animation-direction 정의

 

애니메이션 방향 (= 움직이는 방향)

 



기본값 : normal
속성상속 : X
애니효과 : X
CSS버전: CSS3
JS구문 : object.style.animationDirection="속성값"
브라우저: IE10이상 주요 최신브라우저 (구버전 경우, -webkit- , -moz- , -o- 등 붙여 사용)

 

 

 

animation-direction 구문

 

선택자 {animation-direction: 속성값;}

 


 

[속성값]

 

normal

기본값. 애니메이션 정방향 재생

 

reverse

애니메이션 역방향 재생.

 

alternate

애니메이션 정방향 재생 후 역방향 재생.

 

alternate-reverse

애니메이션 역방향 재생 후 정방향 재생.

 

initial

이 속성의 기본값으로 설정.

 

inherit

부모 요소 속성을 상속.

 


방문 감사합니다. (즐겨찾기 등록: Ctrl + D)

분류 제목
게시물이 없습니다.
목록
찾아주셔서 감사합니다. Since 2012