🐨CoalaCoding
DocsExamplesTry itBoardB반
🐨CoalaCoding

개발자를 위한 한국어 웹 기술 문서

문서

  • JavaScript
  • Web Publishing
  • React
  • Python

커뮤니티

  • 게시판
  • 예제 모음
  • Try it 에디터

기타

  • GitHub
  • 관리자
© 2026 CoalaCoding. All rights reserved.
  • 01_변수
  • 02_mask
  • 03_기본문법과-선택자
  • 04_네스팅
  • 05_svg
  • 06_가로스크롤
  • 07_문자
  • 08_반응형-폰트크기
  • 09_문단
  • 10_리퀴드글래스
  • 11_배경
  • 12_세로정렬
  • 13_박스모델
  • 14_레이아웃
  • 15_트랜지션과-애니메이션
  • 10_svg
  • 11_폼디자인
  • 12_clamp(),min(),max()
  • 14_calc
  • 15_animation
  • 16_transition
  • 1_선택자
  • 2_hover효과
  • 3_var
  • 4_클립패스
  • 5_마스크
  • 6_containerQuery
  • 7_retina
  • 8_반응형 햄버거메뉴
  • 9_transform
  • 05_ 반응형 디자인과 접근성
  1. 홈
  2. 문서
  3. HTML & CSS
  4. CSS
  5. 15_animation

15_animation

코드 블록의 Try it Yourself 버튼으로 직접 실행할 수 있다.

구문

1. 개요

MDN

특정 요소에 애니메이트 효과를 적용할수 있다. 애니메이션 세부 속성을 지정한 @keyfames를 이용해 키프레임에서 변하는 속성값을 설정해서 애니메이션을 추가한다.

2. 기본문법

animation: <property> <duration> <timing-function> <delay>;

예시: animation: rotateBox 3s infinite ease;

3. 속성

3.1. animation()

속성 명초기값설명
animation-namenone애니메이션 이름
animation-durationOs지속 시간(s, ms 단위 사용)
animation-timing-functionease속도변화 지정
animation-delayOs시작 전 지연 시간 지정
animation-iteration-count1반복 여부(숫자, infinite)
animation-directionnormal방향(normal, reverse, alternate, alternate-reverse)
animation-fill-modenone실행 전과 후에 대상에 스타일을 적용방법(forwards,backwards,both)
animation-play-staterunning실행 여부 (paused, running)

3.2. @keyframes

@keyframes [animation-name] {
from { 속성 : 속성 값; }
50% {속성 속성 값; }
to { 속성: 속성 값; }
}

목차

  • 구문