CSS 3 애니메이션 효과 데모
10757 단어 CSS
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>CSS3 demotitle>
<meta name="author" content="" />
<style>
*{margin:0;padding:0;}
.box{
position:absolute;
left:200px;
top:400px;
height:100px;
width:100px;
background:red;
color:#fff;
font-size:20px;
line-height:100px;
text-align:center;
}
@keyframes boxmove{
0%{
top:350px;
left:290px;
font-size:20px;
transform:rotateZ(0deg) scale(1.0);
background:pink;
}
10%{
top:320px;
left:390px;
font-size:24px;
transform:rotateZ(45deg) scale(1.2);
background:blue;
}
20%{
top:310px;
left:410px;
font-size:26px;
transform:rotateZ(75deg) scale(1.3);
background:yellow;
}
30%{
top:300px;
left:520px;
font-size:23px;
transform:rotateZ(95deg) scale(1.5);
background:yellow;
}
55%{
top:270px;
left:650px;
font-size:22px;
transform:rotateZ(155deg) scale(1.3);
background:green;
}
75%{
top:230px;
left:770px;
font-size:20px;
transform:rotateZ(225deg) scale(1.2);
background:#ccc;
}
100%{
top:150px;
left:1020px;
font-size:18px;
transform:rotateZ(360deg) scale(1.0);
background:pink;
}
}
.box{
animation:boxmove 3s linear 0s infinite alternate;
}
style>
head>
<body>
<div class="box">boxdiv>
body>
html>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【Grunt】 복수의 CSS, JavaScript 파일을 minfy한다여러 CSS, JavaScript 파일을 Grunt를 사용하여 단번에 각각 하나의 파일로 minfy합니다. ① Gruntfile 작성 ② package.json 쓰기 ④ html CSS, JavaScript 지정 부...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.