首页 > Web开发 > 详细

css3动画曲线运动

时间:2017-06-21 16:40:44      阅读:438      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box{width: 50px;height: 120px;margin-top: 500px;margin-left: 500px}
        .box2{width: 50px;height: 120px;background: black;}
        .box{ animation: top1 1s ease-out forwards}
        .box2{ animation:  right1 1s ease-in forwards ;}

       @keyframes top1 {
          0%{transform: translateY(0px) ;}
          100%{transform: translateY( -200px) ;}
      }
        @keyframes right1 {
            0%{transform: translateX(0px) rotate(0deg);}
            100%{transform: translateX(200px) rotate(90deg);}
        }
    </style>
</head>
<body>
<div class="box">
    <div class="box2"></div>
</div>
</body>
</html>

 

css3动画曲线运动

原文:http://www.cnblogs.com/xiaobaibubai/p/7060189.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!