几个属性的位置不知道放的对不对,或者哪里没有必要放,老师请帮我看一下
来源:3-10 编程练习
都知欢聚最难得
2019-11-18 13:01:11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
padding: 0;
margin: 0;
}
header{
display: flex;
background: #000;
justify-content: space-between;
width: 100%;
box-sizing: border-box;
padding: 0 30px 0 30px;
}
.nav{
display: inline-flex;
align-items: center;
width: 25%;
justify-content: space-between;
}
.nav li{
display: inline-flex;
color: white;
}
.login{
display: inline-flex;
justify-content: space-between;
width: 6%;
align-items: center;
}
.login input{
display: inline-flex;
height: 24px;
background-color: orange;
text-align: center;
border: none;
outline: none;
}
</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回答
同学你好,右侧按钮的父元素已经设置了 display: inline-flex,按钮本身就不用再设置了。其他的没有什么问题,按钮的样式参考如下修改:

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