麻烦老师检查下,还有什么优化的地方没有

来源:3-17 编程练习

weixin_慕沐1378591

2021-02-16 18:49:20

<!DOCTYPE html>

<html>


<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

        /* 在此处补充代码*/

        /* body{

            display: flex;

            width: 100%;

        } */

        *{

            padding0;

            margin0;

        }


        header{

            displayflex;

            width100%;

            justify-contentcenter;

            align-itemscenter;

            background-color:black;

            justify-contentspace-around;

        }

        .nav{

            list-stylenone;

            displayflex;

            width600px;

            justify-contentspace-around;

            colorwhite;

            cursorpointer;

            font-size22px;

        }


        .login{

            displayflex;

            width170px;

            justify-contentspace-between;

        }

        .login input{

            outlinenone;

            bordernone;

            background-colororange;

            width60px;

            border-radius5px;

            font-size17px;

            colorwhite;

            height30px;

            cursorpointer;

        }


        section{

            height400px;

            margin-top30px;

            displayflex;

            flex-wrapwrap;

            justify-contentspace-around;

            align-itemscenter;

        }

        .section{

            background-colorrgba(173216230);

            width45%;

            displayflex;

            border-radius10px;

            height180px;

            justify-contentspace-around;

        }


        .box{

            displayflex;

            flex-directioncolumn;

            font-size18px;

        }

        .box p,.box div {

            /* padding-left: 20px; */

            displayflex;

            flex1;

            justify-contentflex-start;

            align-itemscenter;

        }




        .shopping{

            displayflex;

            background-colororange;

            colorwhite;

            height40px;

            width100px;

            border-radius10px;

            align-itemscenter;

            justify-contentcenter;

            cursorpointer;


            align-selfcenter;


        }


        


    </style>

</head>


<body>

    <!-- 头部 -->

    <header>

        <div class="logo">

            <img src="http://climg.mukewang.com/59197ab000014f1503000100.jpg" alt="">

        </div>

        <ul class="nav">

            <li>课程</li>

            <li>路径</li>

            <li>猿问</li>

            <li>手记</li>

        </ul>

        <div class="login">

            <input type="button" value="登录">

            <input type="button" value="注册">

        </div>

    </header>

    <!-- 主体内容 -->

    <section>

        <div class="section">

            <div class="box">

                <p>《前端小白入门手册》</p>

                <div>适用人群:没有任何前端基础的小白</div>

                <div>费用:¥499</div>

            </div>

            <div class="shopping">

                <div class="btn">加入购物车</div>

            </div>

        </div>

        <div class="section">

            <div class="box">

                <p>《HTML5月CSS3实现动态网页》</p>

                <div>适用人群:有html和css基础的童鞋</div>

                <div>费用:¥599</div>

            </div>

            <div class="shopping">

                <div class="btn">加入购物车</div>

            </div>

        </div>

        <div class="section">

            <div class="box">

                <p>《从H5页面开发到移动端响应式开发》</p>

                <div>适用人群:有html和css基础的童鞋</div>

                <div>费用:¥599</div>

            </div>

            <div class="shopping">

                <div class="btn">加入购物车</div>

            </div>

        </div>

        <div class="section">

            <div class="box">

                <p>《从H5页面开发到移动端响应式开发》</p>

                <div>适用人群:有html和css基础的童鞋</div>

                <div>费用:¥599</div>

            </div>

            <div class="shopping">

                <div class="btn">加入购物车</div>

            </div>

        </div>

    </section>

</body>


</html>


写回答

1回答

好帮手慕久久

2021-02-18

同学你好,代码正确,不需要优化了,很棒,祝学习愉快!

1

0 学习 · 15276 问题

查看课程