본문 바로가기

Webstoryboy

Category

Explanation

CSS/Alphabet

animation-direction

animation-direction

animation-direction 속성은 애니메이션 움직임 방향을 설정합니다.
애니메이션은 움직임 시간, 움직임 지연 시간, 움직임 방향, 움직임 속도, 움직임 진행상태, 움직임 반복 횟수, 움직임 진행상태, 움직임 속도, 키프레임 이름 등을 설정하여 원하는 애니메이션을 구현 할 수 있습니다.


animation-direction

animation-direction 속성은 애니메이션 움직임 방향을 설정합니다.

특징 설명
기본 값 animation-direction : normal;
적용 animation
버전 CSS3
사용성 ★★★☆☆

정의(Definition)

  • animation-direction 속성은 애니메이션 움직임 방향을 설정합니다.
  • animation-direction 속성에는 움직임 속성을 두 개 이상 설정 할 수 있습니다.

애니메이션과 관련된 속성(Animation Related Properties)

  • animation 속성은 애니메이션과 관련된 속성을 일괄적으로 설정합니다.
  • animation-delay 속성은 애니메이션 지연 시간을 설정합니다.
  • animation-direction 속성은 애니메이션 움직임 방향을 설정합니다.
  • animation-duration 속성은 애니메이션 움직임 시간을 설정합니다.
  • animation-fill-mode 속성은 애니메이션이 끝난 후의 상태를 설정합니다.
  • animation-iteration-count 속성은 애니메이션 반복 횟수를 설정합니다.
  • animation-name 속성은 애니메이션 keyframe 이름을 설정합니다.
  • animation-play-state 속성은 애니메이션 진행상태를 설정합니다.
  • animation-timing-function 속성은 애니메이션 움직임의 속도를 설정합니다.

문법(Syntax)

animation-direction : normal | reverse | alternate | alternate-reverse | inherit;

/* 방향 애니메에션 */
animation-direction : normal;
animation-direction : reverse;
animation-direction : alternate;
animation-direction : alternate-reverse;

/* 다중 방향 애니메에션 */
animation-direction : reverse alternate;
animation-direction : normal alternate-reverse;

속성(Property)

속성값 설명
normal 애니메이션의 방향을 정상적(기본값)으로 설정합니다.
reverse 애니메이션 움직임의 방향을 역방향으로 설정합니다.
alternate 애니메이션 움직임의 방향을 순방향을 진행 후 역방향으로 설정합니다.
alternate-reverse 애니메이션 움직임의 방향을 역방향을 진행 후 순방향으로 설정합니다.
inherit 애니메이션 움직임을 상위 요소한테 상속받습니다.

예제1(Sample)

애니메이션 움직임 방향을 설정하는 예제입니다.
HTML
CSS
SCRIPT
<div class="animation-box">
    <div class="box"></div>
</div>
.animation-box.show1 .box {animation: move 2s 2;}
.animation-box.show2 .box {animation: move 2s 2 reverse;}
.animation-box.show3 .box {animation: move 2s 2 alternate;}
.animation-box.show4 .box {animation: move 2s 2 alternate-reverse;}

@keyframes move {
    0%   {left: 0; top: 0;}
    25%  {left: calc(100% - 80px); top: 0;}
    50%  {left: calc(100% - 80px); top: calc(100% - 80px);}
    75%  {left: 0; top: calc(100% - 80px);}
    100% {left: 0; top: 0;}
}
//Javascript none

호환성(Compatibility)

크롬 아이콘 파이어폭스 아이콘 사파리 아이콘 오페라 아이콘 네이버 웨일 익스플로러6 아이콘6 익스플로러7 아이콘7 익스플로러8 아이콘8 익스플로러9 아이콘9 익스플로러10 아이콘10 익스플로러11 아이콘11 엣지 아이콘 안드로이드 아이콘 ios 아이콘
animation-direction

참고 사이트(Reference)


더보기

인스타그램 보기 바로가기

포트폴리오 스터디 바로가기

유튜브 영상보기 바로가기