3-13编程
来源:3-13 编程练习
weixin_慕哥8086897
2019-02-24 11:25:40
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/*在此处补充代码*/
header{
background:black;
display:flex;
justify-content:space-around;
align-items:center;
}
.nav{
color:white;
display:flex;
justify-content:space-around;
list-style:none;
}
.login{
display:flex;
justify-content:space-around;}
.login input{
border:none;
background:orange;
color:white;
border-radius:3px;
}
</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>
设置了justify-content:space-around;但是之间没有空隙1回答
你好,父元素是需要设置宽度的,有了样式才能均分空隙,否则添加样式是不生效的,例如:


还有logo图片与顶部有一些空隙:

这是因为图片是内联元素,默认存在缝隙,所以建议设置图片为block元素。
祝学习愉快!望采纳!
相似问题