88. 人物走路动画
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>走路动画</title>
<style type="text/css">
.box{
width:120px;
height:180px;
border:1px solid #ccc;
margin:50px auto 0;
position:relative;
overflow:hidden;
}
.box img{
display:block;
width:960px;
height:182px;
position: absolute;
left:0;
top:0;
animation:walking 1.0s steps(8) infinite;
}
@keyframes walking{
from{
left:0px;
}
to{
left:-960px;
}
}
</style>
</head>
<body>
<div class="box">< img src="images/walking.png"></div>
</body>
</html>
89. 多帧动画
<html lang="en">
<head>
<meta charset="UTF-8">
<title>多帧动画</title>
<style type="text/css">
.box{
width: 100px;
height: 100px;
background-color: gold;
margin: 50px auto 0;
animation: moving 1s ease 1s both;
}
@keyframes moving{
0%{
transform: translateY(0px);
background-color: cyan;
}
50%{
transform: translateY(400px);
background-color: gold;
boder-radius: 0px;
}
100%{
transform: translateY(0
.:
0px);
background-color: red;
boder-radius: 50%;
}
}
</style>
</head>
<body>
<div class="box">< img src="images/moving.png"></div>
</body>
</html>
90. 浏览器前缀
为了让CSS3样式兼容.
-ms- 兼容IE浏览器
-moz- 兼容firefox
-o- 兼容opera
-webkit- 兼容chrome 和 safari
91. JavaSprict
JavaScript是运行在浏览器端的脚步语言,JavaScript主要解决的是前端与用户交互的问题,包括使用交互与数据交互。 JavaScript是浏览器解释执行的.
页面行为:部分动画效果、页面与用户的交互、页面功能
包含三个部分:ECMAScript、DOM和BOM
解释型语言;类似于 C 和 Java 的语法结构;动态语言;基于原型的面向对象