테스트 사이트 - 개발 중인 베타 버전입니다

Animation 동작 효과 주기

animation 모든 animation 속성을 이용한 스타일을 한 줄에 설정할 수 있음.
animation-name 애니메이션 효과의 이름을 설정함.
animation-duration 애니메이션 효과를 재생할 시간을 설정함.
animation-delay 애니메이션 효과가 나타나기까지의 지연 시간을 설정함.
animation-iteration-count 애니메이션 효과가 몇 번 반복될지를 설정함.
animation-direction 애니메이션의 진행 방향을 설정함.
animation-timing-function 애니메이션 효과의 시간당 속도를 설정함.
animation-fill-mode 애니메이션 효과가 재생 중이 아닐 때 요소의 스타일을 설정함.
animation-play-state 애니메이션 효과의 재생 상태를 설정함.

 

예시>

 

HTML

  <div class="ani1"></div>
  <div class="ani2"></div>

CSS

.ani1{width:100px; height: 100px; margin: 50px auto 0 auto; background: #39e2f2;}
        .ani1:hover{animation: ani 1s ease-in-out .5s 2 alternate;}
        @keyframes ani{
            from{transform: scale(1) translate(0);}
            to{transform: scale(1.5) translate(20%);}
        }
.ani2{width:100px; height: 100px; margin: 100px auto 0 auto; background: #cf243f;}
        .ani2:hover{animation: ani 1s linear infinite alternate;}
        @keyframes ani{
            from{transform: scale(1) translate(0);}
            to{transform: scale(1.5) translate(20%);}
        }

속성값 참고>

ease-in 기본형으로 시작이 빠르게
ease-in-out  시작과끝이 빠르게
lieaner  일정속도
ease-out 끝이 빠르게
alternate 앞에부터 뒤까지 진행하고 다시 뒤에서 앞으로 진행
normal  앞에서부터 뒤로 진행
reverse 뒤에서 앞으로 진행

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

도움됩니다 감사합니다!! 할때마다 복붙이었는뎅,,

게시글 목록

번호 제목
3349
3346
3345
3343
3342
3341
3329
3321
3319
3318
3317
3316
3315
3314
3313
3312
3311
3310
3306
3305
3304
3303
3302
3301
3300
3299
3298
3297
3296
3294