这样可以吗

来源:3-10 编程练习

Ting111

2020-07-08 11:01:52

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

      /*在此处补充代码*/

      header{

          background-color:black;

          color:white;

          display:inline-flex;

          align-items:center;

          width:100%;

          justify-content:space-around;

      }

      div{

          display:inline-flex;

          

      }

      

      ul{

          display:inline-flex;

          list-style:none;

          width:40%;

          

      }

      

      li{

          display: inline-flex;

          justify-content: space-around;

          width:25%;

      }

      input{

          

          background:orange;

          border-radius:6px;

          color:white;

           

          

      }

      .login{

        display: inline-flex;

          justify-content: space-around;

          width: 10%;

      }

      .logo{

        width: 20%;

         display: inline-flex;

          justify-content: space-around;

      }

    </style>

</head>

<body>

   <header>

     <div class="logo">

       <img src="http://climg.mukewang.com/59feb59700019dab01910057.png" 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>

</body>

</html>


写回答

2回答

好帮手慕码

2020-07-08

同学你好,代码可以再优化,如下:

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

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

另,3-11的编程可优化:

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

祝学习愉快~

0

Ting111

提问者

2020-07-08

<!DOCTYPE html>

<html>


<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

    ul {

        list-style: none;

        background-color: orange;

        margin: 0;

        padding: 0;

        height: 150px;

        width: 390px;

        /*此处补充代码*/

        display:inline-flex;

        justify-content:space-between;

        flex-wrap:wrap;

        align-content:space-around;

    }

    

    li {

        font-size: 24px;

        width: 100px;

        background-color: pink;

    }

    </style>

</head>


<body>

    <ul>

        <li>第一个li</li>

        <li>第二个li</li>

        <li>第三个li</li>

        <li>第四个li</li>

        <li>第五个li</li>

        <li>第六个li</li>

    </ul>

</body>


</html>

还有这个3-11的,到上限了,放这里谢谢老师

0

0 学习 · 6815 问题

查看课程