码迷,mamicode.com
首页 > Web开发 > 详细

[ css 动画 animation ] animation新增动画属性的实例演示

时间:2016-06-27 13:46:47      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang=‘zh-cn‘>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>[ animation ] 新增动画属性的实例演示</title>
<meta http-equiv=‘description‘ content=‘this is my page‘>
<meta http-equiv=‘keywords‘ content=‘keyword1,keyword2,keyword3‘>

<style type=‘text/css‘>
div {
  margin: 0; padding: 0;
}
#box {
  width: 100px; height: 100px; background:red;animation:move 3s 3 alternate forwards;position:absolute;left:0;top:0; 
}
@keyframes move{
  0%{
    left:0;
    top:0;
  }
  10%{
    left:300px;
    top:450px;
  }
  50%{
    left:0px;
    top:500px;
  }
  75%{
    left:900px;
     top:50px;
  }
  100%{
     left:70px;
     top:230px;
  }
}

</style>
</head>
<body>
  <div id=‘box‘></div>
</body>
</html>

 

[ css 动画 animation ] animation新增动画属性的实例演示

标签:

原文地址:http://www.cnblogs.com/mysearchblog/p/5619805.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!