哪里出错了

来源:2-7 编程练习

qq_哦_36

2018-08-02 17:30:39

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>2-2</title>
    <style type="text/css">
        div {
            font-family: 'Microsoft Yahei';
            font-size: 60px;
            font-weight: bold;
            line-height: 600px;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            width: 800px;
            height: 600px;
            margin: auto;
            text-align: center;
            border: 5px solid #000;
            border-radius: 50%;
            /*此处写代码*/
            animation-name:cansee;
            animation-delay:10s;
       }
           @keyframes cansee{
               from{
                   color: transparent;
                   border: 5px solid transparent;
               }
               to{
                   color: #000000;
                   border: 5px solid #000000;
               }
           }
   </style>
</head>
<body>
    <div>大家好,欢迎来到慕课网!</div>
</body>
</html>

写回答

1回答

好帮手慕糖

2018-08-02

你好,animation-delay是定义动画何时开始,这里设置为10s,指10s之后才开始执行动画。而这里缺少规定完成动画所花费的时间。即:animation-duration,其默认值是 0,意味着没有动画效果。这里可以添加下哦。例:

http://img.mukewang.com/climg/5b62dcaa000192fa02930102.jpg

若能解决你的疑问,望采纳。

祝学习愉快~

0

0 学习 · 5760 问题

查看课程