老师,哪里还需要改进的
来源:3-10 编程练习
Victor19950925
2019-06-22 17:12:52
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/*在此处补充代码*/
header {
width: 100%;
height: 80px;
display: flex;
background: black;
justify-content: space-around;
align-items: center
}
.nav {
display: flex;
width: 500px;
color: white;
list-style: none;
font-size: 20px;
justify-content: space-around;
}
.login{
display: flex;
justify-content: space-around;
width: 120px;
}
input{
background: orange;
color: white;
border-radius: 5px;
border: none;
width: 45px;
height: 25px;
}
</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回答
同学你好, 如下图所示, 由于列表有默认的内边距,导致中间导航整体水平居中有误差哦。

建议: 可以给使用通配符, 清除所有元素的内外边距

如果帮助到了你, 欢迎采纳!
祝学习愉快~~~
相似问题