麻烦检查一下
来源:2-2 编程练习
慕桂英8325342
2019-06-14 12:30:31
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>IMOOC</title>
<style type="text/css">
*{
margin:0;
padding:0;
color:#fff;
}
a{
text-decoration:none;
}
.container{
height:80px;
background:#000;
}
.container>logo{
display:block;
font-size:30px;
float:left;
margin: 10px 50px;
line-height:80px;
}
nav{
float:right;
margin-right:50px;
}
nav>a{
float:left;
font-size:20px;
width:100px;
height:73px;
line-height:73px;
text-align:center;
}
nav>a:hover{
padding-bottom:7px;
}
.home{
background:red;
}
.course{
background:yellow;
}
.actual{
background:green;
}
.plan{
background:purple;
}
.fag{
background:orange;
}
.notes{
background:blue;
}
</style>
</head>
<body>
<header class="container">
<logo><a href="#"><img src="http://climg.mukewang.com/582e5f160001b17100400040.png"/>MYMOOC</a></logo>
<nav>
<a href="#" class="home">home</a>
<a href="#" class="course">course</a>
<a href="#" class="actual">actual</a>
<a href="#" class="plan">plan</a>
<a href="#" class="fag">faq</a>
<a href="#" class="notes">notes</a>
</nav>
</header>
</body>
</html>
1回答
好帮手慕码
2019-06-14
同学你好!
代码效果实现是可以的哦
如果帮助到了你 欢迎采纳 祝学习愉快~