老师你看这样对吗
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{
margin: 0;padding: 0;
font-family: arial;
}
a{
color: #FFFFFF;
text-decoration: none;
}
img{ vertical-align:bottom;}
header{
width: 100%;height: 80px;
background: #000000;
overflow: hidden;
}
header>.container{
width: 100%;
margin: 0 auto;
}
header>.container>a{
display: block;
float: left;
font-size: 25px;
margin: 20px 0 20px 200px;
}
header>.container>nav{
float: right;
margin: 0 200px 0 0;
}
header>.container>nav>a{
display: block;
float: left;
width: 100px;height: 73px;
line-height: 73px;
text-align: center;
font-size: 20px;
}
header>.container>nav>a:nth-child(1){background: #D40112;}
header>.container>nav>a:nth-child(2){background: #FEB800;}
header>.container>nav>a:nth-child(3){background: #78B917;}
header>.container>nav>a:nth-child(4){background: #433B90;}
header>.container>nav>a:nth-child(5){background: #F27C01;}
header>.container>nav>a:nth-child(6){background: #017FCB;}
header>.container>nav>a:hover,
header>.container>nav>a.home{padding-bottom: 7px;}
</style>
</head>
<body>
<header>
<div class="container">
<a href="index.html">
<img src="imges/logo.png">
<span>MYMOOC</span>
</a>
<nav>
<a href="index.html" class="home">HOME</a>
<a href="#">COURSE</a>
<a href="#">ACTUAL</a>
<a href="#">PLAN</a>
<a href="#">FAQ</a>
<a href="#">NOTES</a>
</nav>
</div>
</header>
</body>
</html>
正在回答
同学你好,代码实现正确。另外,给同学一个建议:如果题目中已经提供了在线图片,建议使用题目给出的,不然老师这边看不到同学本地的图片。
如果我的回答帮助到了你,欢迎采纳,祝学习愉快~
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星