为什么没有效果

为什么没有效果

<!DOCTYPE html>
<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);
            /*此处写代码*/
           animation:BOX 2s .5s ease-in-out normal infinite; 
        }
        @keyframes translate{
           0%{bottom:40px;}
           25%{bottom:40px;}
        }
    </style>
</head>
<body>
    <div>&gt;</div>
</body>
</html>


正在回答

登陆购买课程后可参与讨论,去登陆

3回答

你好,声明的动画名,与使用时的要一致,整体可参考下图:

http://img1.sycdn.imooc.com//climg/5a54192c00013ba710310423.jpg

祝学习愉快~

提问者 weibo_脂粉乱了丨_0 2018-01-08 19:30:16
            /*此处写代码*/
            transition-delay:.5s;
            transition-timing-function:ease;
            animation-iteration-count:infinite;
        }
        @keyframes div{
           0%{top:40px;}
           100%{bottom:40px;}
        }

重新修改了还是没有效果

好帮手慕糖 2018-01-08 11:47:27

你好,动画名称不对,声明的是translate,但是使用的而是Box,建议:认真查看下代码。另:0%与25%的值是一样的,可稍微调整下。

祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师