请问为什么导航条每一项不能靠右
<html>
<head>
<meta charset="utf-8">
<title>宣传页项目</title>
<link rel="stylesheet" href="css/index.css" type="text/css">
<link rel="stylesheet" href="css/base.css" type="text/css">
</head>
<body>
<div class="box">
<header class="header">
<div class="header__logo">H5实战页面</div>
<nav class="header__nav">
<a href="" class="header__nav-item header__nav-item_status_active">实战课程</a>
<a href="" class="header__nav-item">商业案例</a>
<a href="" class="header__nav-item">课程体系</a>
<a href="" class="header__nav-item">集成环境</a>
<a href="" class="header__nav-item">云端学习</a>
<a href="" class="header__nav-item">即刻学习</a>
</nav>
</header>
</div>
</body>
.header{
width: 100%;
height: 60px;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.header__logo{
width:40%;
height:40px;
text-indent: 50px;
line-height: 40px;
font-size: 18px;
background-color: black;
background: url(../img/logo.png) left center no-repeat;
position: absolute;
top: 50%;
margin-top: -20px;
left: 10px;
}
.header__nav{
width:60%;
height:40px;
position: absolute;
right: 0px;
top: 50%;
margin-top: -20px;
display: inline-block;
}
.header__nav-item{
font-size: 12px;
padding: 39px;
height:40px;
line-height:40px;
}
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星