麻烦老师检查下,有什么地方需要优化?

来源:3-10 编程练习

慕大仙er

2021-05-31 11:04:44

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no">

<title></title>

<style>

*{

padding:0;

margin:0;

}

header, .logo, .nav, .login{

display: flex;

}

header{

​background:black;

justify-content: space-around;

align-items:center;

height:40px;

}

.logo img{

height:40px;

}

.nav{

width: 700px;

font-size:20px;

color:white;

box-sizing: border-box;

justify-content: center;

}

.nav li{

list-style:none;

float:left;

padding-left:50px;

padding-right:50px;

}

.login{

width:100px;

box-sizing:border-box;

}

.login input{

width:50px;

height:30px;

border: none;

outline: none;

background-color: orange;

color:white;

border-radius:2px;

cursor: pointer;

margin-left:10px;

}

</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回答

好帮手慕星星

2021-05-31

同学你好,代码布局以及实现效果很棒,不需要优化了。继续加油,祝学习愉快!

0

0 学习 · 15276 问题

查看课程