老师帮帮看看代码~

来源:2-20 编程练习

我代码么问题

2021-07-31 20:29:41

<!DOCTYPE html>

<html>

<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: disp 1s ease 1s ;

            

       }

       

       

       @keyframes disp{

           from{

               transform:translate(0,-1000px);

           }

           to{

               transform:translate(0,1060px);

           }

       }

   </style>

</head>

<body>

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

</body>

</html>


写回答

1回答

好帮手慕久久

2021-08-01

同学你好,代码正确,可以优化一下:

让元素执行完,保持最终的状态,会更好看:

http://img.mukewang.com/climg/6105fb0009e9985f05220084.jpg

祝学习愉快!

0

0 学习 · 15276 问题

查看课程