利用html 动画做出一个 "王" 字
2017-12-28 20:49
316 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.div1{
margin: 0 auto;
width: 20px;
height: 140px;
background-color: red;
transition: all 1s ease-out 1s;
}
.div1:hover{
background-color: blue;
transform: scale(1,1) rotate(90deg) translate(80px,0px);
}
.div2{
margin: 0 auto;
width: 100px;
height: 100px;
background-color: red;
animation: secondA 5s 1 linear running forwards;
}
/*动画*/
@keyframes fristA{
from{background-color: red;}
to{background-color: brown;}
}
@keyframes secondA{
0% {background-color: red; width: 100px; height: 100px; transform: rotate(30deg);}
25% {background-color: yellow; width: 90px; height: 110px; transform: translate(200px,0px);}
50% {background-color: blueviolet; width: 80px;height: 120px; transform: scale(2,2);}
75% {background-color: brown; width: 70px; height: 130px; top: 400px;}
100% {background-color: brown; width: 20px;height: 100px; top: 0px;}
}
.div4{
margin: 0 auto;
width: 100px;
height: 100px;
background-color: red;
animation: secondAA 5s 1 linear running forwards;
}
/*动画*/
@keyframes fristAA{
from{background-color: red;}
to{background-color: brown;}
}
@keyframes secondAA{
0% {background-color: red; width: 100px; height: 100px; transform: rotate(30deg);}
25% {background-color: yellow; width: 90px; height: 110px; transform: translate(0px,200px);}
50% {background-color: blueviolet; width: 80px;height: 120px; transform: scale(2,2);}
75% {background-color: brown; width: 70px; height: 130px; top: 400px;}
100% {background-color: brown; width: 20px;height: 100px; top: 0px;}
}
.div3{ margin:0 auto; width: 140px; height: 20px;background-color: #0000FF;}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>
<div class="div3"></div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.div1{
margin: 0 auto;
width: 20px;
height: 140px;
background-color: red;
transition: all 1s ease-out 1s;
}
.div1:hover{
background-color: blue;
transform: scale(1,1) rotate(90deg) translate(80px,0px);
}
.div2{
margin: 0 auto;
width: 100px;
height: 100px;
background-color: red;
animation: secondA 5s 1 linear running forwards;
}
/*动画*/
@keyframes fristA{
from{background-color: red;}
to{background-color: brown;}
}
@keyframes secondA{
0% {background-color: red; width: 100px; height: 100px; transform: rotate(30deg);}
25% {background-color: yellow; width: 90px; height: 110px; transform: translate(200px,0px);}
50% {background-color: blueviolet; width: 80px;height: 120px; transform: scale(2,2);}
75% {background-color: brown; width: 70px; height: 130px; top: 400px;}
100% {background-color: brown; width: 20px;height: 100px; top: 0px;}
}
.div4{
margin: 0 auto;
width: 100px;
height: 100px;
background-color: red;
animation: secondAA 5s 1 linear running forwards;
}
/*动画*/
@keyframes fristAA{
from{background-color: red;}
to{background-color: brown;}
}
@keyframes secondAA{
0% {background-color: red; width: 100px; height: 100px; transform: rotate(30deg);}
25% {background-color: yellow; width: 90px; height: 110px; transform: translate(0px,200px);}
50% {background-color: blueviolet; width: 80px;height: 120px; transform: scale(2,2);}
75% {background-color: brown; width: 70px; height: 130px; top: 400px;}
100% {background-color: brown; width: 20px;height: 100px; top: 0px;}
}
.div3{ margin:0 auto; width: 140px; height: 20px;background-color: #0000FF;}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>
<div class="div3"></div>
</body>
</html>
相关文章推荐
- 【Java】利用注解和反射实现一个"低配版"的依赖注入
- 利用epoll写一个"迷你"的网络事件库
- 1、web(html):利用VS2010开发一个跳转页面aspx
- css3动画的"消失"””
- 有一个字符数组的内容为:"student a am i",请你将数组的内容改为"i am a student".
- 一个数如果恰好等于它的因子之和,这个数就称为 "完数 "。例如6=1+2+3.编程 找出1000以内的所有完数。
- 如何用C语言画一个高逼格的"心形"?
- 利用SDL编程做一个简单的动画;
- 编写 "纯HTML" jsp应用--学会使用 JSTL
- "一个程序员的生命周期"读后感
- 有一个字符数组的内容为:"student a am i",请你将数组的内容改为"i am a student". 要求: 不能使用库函数。只能开辟有限个空间(空间个数和字符串的长度无关)。 提交
- silverlight: "[HtmlPage_NotEnabled] 调试资料字符串不可用"的解决
- [导入]HTML中利用纯Microsoft Ajax Library做出可调用WebSerives的AutoComplete
- (15)html表单之四“readonly”“disabled”“tabindex”和"accesskey"
- C#--第11周实验--任务9(设计一个窗体)--利用Timer和图片框控件,编写一个图片不断向左移动的小动画
- 关于"干货集中营"的一个开源App
- 安卓webview和js+html交互利用的addJavascriptInterface和webview.loadUrl("javascript:**");
- Springboot 利用Aspect 解决NULL 返还为""
- java中利用动态代理,生成"空"对象的例子
- 利用Html 5的canvas标签绘制水流和水池动画