请老师检查,谢谢

来源:2-20 编程练习

迷迷糊糊学习

2021-12-02 18:04:15

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>2-4</title>

    <style type="text/css">

        div {

            font-family: 'Microsoft Yahei';

            font-size: 60px;

            font-weight: bold;

            line-height: 600px;

            position: absolute;

            top: -1000px;

            right: 0;

            left: 0;

            width: 800px;

            height: 600px;

            margin: auto;

            text-align: center;

            border: 5px solid #000;

            border-radius: 50%;

            animation-name: disp;

            animation-duration: 1s;

            animation: xs 2s linear 2s;

            /*此处写代码*/

       }

       @keyframes xs{

           from{

               transform: translateX(0);

           }

           to{

               transform: translateY(1000px);

           }

       }

   </style>

</head>

<body>

    <div>大家好,欢迎来到慕课网!</div>

</body>

</html>


写回答

1回答

好帮手慕然然

2021-12-02

同学你好,代码有点小问题,练习给出的代码中已经设置了animation-name属性和animation-duration属性,建议同学继续接着向下写即可,参考如下:

https://img.mukewang.com/climg/61a89cf2093757aa07250312.jpg

祝学习愉快!



0

0 学习 · 17877 问题

查看课程