본문 바로가기

아래로 스크롤 해주세요!

My Reference Book

-

제가 배웠던것을 한곳에 정리해보았어요!

HTML

HTML 태그 톺아보기

HTML

자세히보기

CSS

CSS 속성 톺아보기

CSS

자세히보기

JAVASCRIPT

JS 실행문 톺아보기

JAVASCRIPT

자세히보기

최신댓글

CSS

CSS 애니메이션 : 요소의 움직임!

by C0Di 2022. 9. 8.
728x90

SVG로 도형 만들어보기

svg 태그안에 rect를 point로 수치를 조정해 도형을 구현해낼 수 있는데 한번 이번 시간에는 해당 부분에 대하여 학습해봅시다!


animation

종류 예시
animation-name @keyframe에 지정된 이름을 설정합니다.
animation-duration 애니메이션이 실행되는 시간을 설정합니다.
animation-timing-function 애니메이션 키프레임 움직임을 설정합니다.
animation-delay 애니메이션이 시작되기 전까지 시간을 설정합니다.
animation-iteration 애니메이션 반복 횟수를 설정합니다.
animation-derection 애니메이션 방향을 설정합니다.
animation-fill-mode 애니메이션 끝나고 난 뒤 어떤 값을 적용할지 설정합니다.
animation-play-state 애니메이션 실행 상태를 설정합니다.

transition

종류 예시
transition-property 트렌지션을 적용할 CSS 속성 대상을 설정합니다.
transition-druation 트렌지션 작동시간을 설정합니다.
transition-timing-function 트렌지션 움직임 효과를 설정합니다.
transition-delay 트렌지션이 시작되기 전까지 시간을 설정합니다.

timing-function

종류 예시
linear 일정한 간격으로 설정합니다.
ease 처음에는 서서히 가속하고 마지막 부분에서 급격히 감속합니다.
ease-in 처음에는 천천히 시작하고 마지막에 가속합니다.
ease-out 처음에는 최대 속도로 시작하고 마지막에 감속합니다.
ease-in-out 처음에는 제로 속도로 시작하고, 중간 지점에서 최고 속도로 움직이고, 마지막 부분에서 서서히 감속합니다.
step-start 애니메이션을 시작점에서 설정합니다.
step-end 애니메이션을 끝점에서 설정합니다.
steps(int, start/end) 애니메이션을 단계별을 설정합니다.
cubic-bezier(n,n,n,n) 버지니아 곡선 값을 만들어서 설정합니다.

움직이는 공

start를 누르면 움직이며, 애니메이션이 끝날시 Go를 눌렀을때 추가했던 클래스 "show"를 제거합니다.

Go
linear
ease
ease-in
ease-out
ease-in-out
.timing1.show {animation: move 2s 1 linear;}
.timing2.show {animation: move 2s 1 ease;}
.timing3.show {animation: move 2s 1 ease-in;}
.timing4.show {animation: move 2s 1 ease-out;}
.timing5.show {animation: move 2s 1 ease-in-out;}

@keyframes move {
    0% {left: 0%;}
    50% {left: 100%;}
    100% {left: 0%;}
}

step-start
step-end
steps(4, start)
steps(4, end)
steps(10, start)
steps(10, start)
.timing6.show {animation: move 4s 1 step-start;}
.timing7.show {animation: move 4s 1 step-end;}
.timing8.show {animation: move 4s 1 steps(4, start);}
.timing9.show {animation: move 4s 1 steps(4, end);}
.timing10.show {animation: move 4s 1 steps(10, start);}
.timing11.show {animation: move 4s 1 steps(10, end);}

border-radius

timing12
timing13
timing14
timing15
timing16
.timing12.show {animation: move 3s 2 cubic-bezier(0,.71,0,1);}
.timing13.show {animation: move 3s 2 cubic-bezier(0,.71,1,-0.28);}
.timing14.show {animation: move 3s 2 cubic-bezier(1,-0.52,1,-0.28);}
.timing15.show {animation: move 3s 2 cubic-bezier(1,.02,0,1.01);}
.timing16.show {animation: move 3s 2 cubic-bezier(.33,2.04,1,2.05);}

timing17
timing18
timing19
timing20
.timing17.show {animation: move 3s 0.1s 2 ease;}
.timing18.show {animation: move 3s 0.2s 2 ease;}
.timing19.show {animation: move 3s 0.3s 2 ease;}
.timing20.show {animation: move 3s 0.4s 2 ease;}

timing21
timing22
timing23
timing24
.timing21.show {animation: move 1s 1 ease;}
.timing22.show {animation: move 1s 2 ease;}
.timing23.show {animation: move 1s 3 ease;}
.timing24.show {animation: move 1s infinite ease;}

timing25
.timing25.normal {animation: move2 4s 5 ease normal;}
.timing26.reverse {animation: move2 4s 5 ease reverse;}
.timing27.alternate {animation: move2 4s 5 ease alternate;}
.timing28.alternate-reverse {animation: move2 4s 5 ease alternate-reverse;}

timing26
timing27
timing28
timing29
.timing26.show {animation: move3 3s 1 ease; animation-fill-mode: none;}
.timing27.show {animation: move3 3s 1 ease; animation-fill-mode: forwards;}
.timing28.show {animation: move3 3s 1 ease; animation-fill-mode: backwards;}
.timing29.show {animation: move3 3s 1 ease; animation-fill-mode: both;}
@keyframes move3 {
0% {left: 0%;}
100% {left: calc(100% - 120px);}
}

timing31
.timing30.running {animation: move2 4s 100 ease; animation-play-state: running;}
.timing30.paused {animation: move2 4s 100 ease; animation-play-state: paused;}
728x90
반응형

댓글

#HASH_TAGS

-

1

울적하니 꽃을 달아봤습니다 오징어 1Kg 당 3000원 오늘 조업 마감했습니다. 오늘도 웹표준은.. 화사한가요? 내일은 즐거운 월요일 메서드 숙제가 다양해서 너무 좋아요 오징어 두마리 포획 완료 오늘은 내가바로 오징어! 공부 JQuery ImageSlideEffect Method 다크모드 선택해주세요 코드 scroll-snap-align 필터선택자 코딩 오징어 한마리 수확 완료! scroll-snap-type 슬라이드 결과 : 월요일 멈추지 않는 ' j ' 시리-즈 이건 또 뭐람 HTML 제이쿼리