CSS3 애니메이션 채우기 모드 속성


  번역 결과:
애니메이션

英[fəl] 美[fəl]

vt.& vi. (만들다) 가득 차다

vt. 만족시키다, (주문하다) 공급하다; (감정)

n. 양을 채우다... ;full; fill;英[məʊd] 美[moʊd]

n.조건; 패션, 모드

복수: 모드

CSS3 애니메이션 채우기 모드 속성통사론

기능: animation-fill-mode 속성은 애니메이션 재생 전 또는 후에 애니메이션 효과를 표시할지 여부를 지정합니다.

구문: ​​animation-fill-mode: 없음 | 앞으로 | 뒤로 | 둘 다;

설명: none은 기본 동작을 변경하지 않습니다. 앞으로 애니메이션이 완료되면 마지막 속성 값(마지막 키프레임에 정의됨)을 유지합니다. reverses는 animation-delay로 지정된 기간 동안 애니메이션이 표시되기 전에 시작 속성 값(첫 번째 키프레임에 정의됨)을 적용합니다. 앞으로 채우기 모드와 뒤로 채우기 모드가 모두 적용됩니다.​

참고: Internet Explorer 9 및 이전 버전은 animation-fill-mode 속성을 지원하지 않습니다.

CSS3 애니메이션 채우기 모드 속성예

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title></title> 
<style> 
div
{
	width:100px;
	height:100px;
	background:red;
	position:relative;
	animation:mymove 3s;
	animation-iteration-count:2;
	animation-fill-mode:forwards;

	/* Safari 和 Chrome */
	-webkit-animation:mymove 3s;
	-webkit-animation-iteration-count:2;
	-webkit-animation-fill-mode:forwards;
}

@keyframes mymove
{
	from {top:0px;}
	to {top:200px;}
}

@-webkit-keyframes mymove /* Safari 和 Chrome */
{
	from {top:0px;}
	to {top:200px;}
}
</style>
</head>
<body>

<p><strong>注意:</strong>Internet Explorer 9 及其之前的版本不支持 animation-fill-mode 属性。</p>

<div></div>

</body>
</html>

인스턴스 실행 »

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

인기 추천

비디오

Q&A