2-16编程联系

来源:3-1 @keyframes

a386491333

2017-06-22 21:08:21

<html>
<head>
    <meta charset="UTF-8">
    <title>2-9</title>
    <style type="text/css">
        div {
            font-family: Arial;
            font-size: 72px;
            font-weight: bold;
            position: fixed;
            right: 0;
            left: 0;
            width: 30px;
            height: 30px;
            margin: auto;
            transform: rotate(90deg);
            /*此处写代码*/
            top:90%;
            animation: active1 .8s infinite alternate;        }
        @keyframes active1{
            form {top:90%;}
            to   {top:95%;}
        }    </style>
</head>
<body>
    <div>></div>
</body>
</html>

做不出像gif中可以弹2次的动画,只能做出1次的效果

写回答

1回答

怎么都被占用了呢

2017-06-23

定义动画时,不止可以使用from to的,还可以使用百分比多设置几个时间轴,在一个动画中完成抖动效果。例如:http://climg.mukewang.com/594c80cd00017e7403690147.jpg

0
h386491333
h 非常感谢!懂得啦
h017-06-23
共1条回复

0 学习 · 5760 问题

查看课程