请问这样写对吗?

来源:2-20 编程练习

神知

2021-10-27 01:19:44

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>Document</title>

    <style>

        *{

            margin: 0;

            padding: 0;

        }

        .welcome{

            width: 800px;

            height: 550px;

            border: 5px solid #000;

            border-radius: 58%;

            margin: 0 auto;

            display: block;

            animation: yuan 1s linear 2s;

            position: absolute;

            top: -650px;

            left: 50%;

            margin-left: -400px;

            text-align: center;

        }

        .welcome span{

            font-size: 40px;

            font-weight: 700;

            line-height: 550px;


        }

        @keyframes yuan{

            form{

                transform: translateY(-100px);

            }

            to{

                transform: translateY(650px);

            }

        }

    </style>

</head>

<body>

    <div class="welcome">

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

    </div>

</body>

</html>


写回答

1回答

好帮手慕慕子

2021-10-27

同学你好,代码效果实现是对的,很棒!!!祝学习愉快~

0

0 学习 · 15276 问题

查看课程