3-13练习这样写有什么问题吗?

来源:3-13 编程练习

慕九州7567404

2019-02-25 11:42:32

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        /*在此处补充代码*/
        *{
            margin: 0;
            padding: 0;
            border: none;
        }
        header{
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 65px;
            background-color: #000;
            min-width: 800px;
        }
        .logo img{
            display: block;
        }
        /*导航项*/
        .nav{
            list-style: none;
            display: flex;
            justify-content: space-between;
            width: 500px;
        }
        .nav li{
            color: #fff;
            font-size: 20px;
        }
        /*登录*/
        .login{
            display: flex;
            justify-content: space-between;
            width: 100px;
        }
        .login input{
            background-color: yellow;
            border-radius: 3px;
            width:30px;
        }
    </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>


写回答

1回答

好帮手慕星星

2019-02-25

你好,代码实现布局效果是没有问题的。

右侧两个按钮宽高样式有点小,可以适当调整一下:

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

祝学习愉快!

0

0 学习 · 5012 问题

查看课程

相似问题