CSS

[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

부모 요소 속성을 상속.

 



분류 제목
intro CSS - 브라우저 접두어 (= vendor prefix = 벤더 프리픽스)
border CSS - border-radius 속성 ★ - 테두리둥글기 지정 (= border-radius속성 = 보더…
border CSS - border-top-left-radius 속성 - 테두리상단왼쪽둥글기 지정 (= 보더탑레프트레이디…
border CSS - border-top-right-radius 속성 - 테두리상단우측둥글기 지정 (= 보더탑라이트레이…
border CSS - border-bottom-right-radius 속성 - 테두리 하단 오른쪽 모서리 둥글게 (= …
border CSS - border-bottom-left-radius 속성 - 테두리하단왼쪽모서리둥글게 (= border…
border CSS - border-image 속성 - 테두리이미지 (= border-image속성 = 보더이미지속성, …
border CSS - border-image-source 속성 - 테두리 이미지 주소 (= border-image-so…
border CSS - border-image-slice 속성 - 테두리이미지자르기 (IE11)
border CSS - border-image-width 속성 - 테두리 이미지 너비 (= border-image-wid…
border CSS - border-image-outset 속성 - 테두리 경계 넘는 이미지 양. (= 보더이미지아웃셋속…
border CSS - border-image-repeat 속성 - 테두리 이미지 반복할지 늘릴지 선택 (= 보더이미지리…
background CSS - background-clip 속성 - 배경영역 (= background-clip속성 = 백그라운드…
background CSS - background-origin 속성 - 배경이미지 좌표시작점 (= 백그라운드오리진 속성)
background CSS - background-size 속성 ★ - 배경이미지 크기 (background-size속성 = 백…
9/33
목록
 홈  PC버전 로그인 일본어
그누앞단언어 1
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 1
웹유틸
회원센터
홈짱닷컴 PC버전 로그인