html5+css3动画
程序员文章站
2024-01-29 21:53:22
...
此动画仅限谷歌浏览器····
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<style type="text/css">
//格式的大小与循环移动改变颜色
.myfirst{
height: 200px;
background:red;
width: 200px;
position:relative;
-webkit-animation: myfirst 5s linear 0s infinite alternate;
}
//颜色与位置的变化
@-webkit-keyframes myfirst /* Safari and Chrome */
{
0% {background:red; left:0px; top:0px;}
25% {background:yellow; left:200px; top:0px;}
50% {background:blue; left:500px; top:500px;}
75% {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}
</style>
<body>
<div class="myfirst"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<style type="text/css">
//格式的大小与循环移动改变颜色
.myfirst{
height: 200px;
background:red;
width: 200px;
position:relative;
-webkit-animation: myfirst 5s linear 0s infinite alternate;
}
//颜色与位置的变化
@-webkit-keyframes myfirst /* Safari and Chrome */
{
0% {background:red; left:0px; top:0px;}
25% {background:yellow; left:200px; top:0px;}
50% {background:blue; left:500px; top:500px;}
75% {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}
</style>
<body>
<div class="myfirst"></div>
</body>
</html>
上一篇: 敏感词过滤
下一篇: 关于DW连接mysql数据库的问题