如上图所示
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>首页</title>
<style type="text/css">
.bird-style{
margin:15px 0 0 0;
height: 40px;
border:1px solid red;
}
.nav-style{
height: 65px;
border:1px solid blue;
}
a{
font-size: 40px;
color: black;
text-decoration: none;
width:30px;
border:1px solid green;
}
</style>
</head>
<body>
<nav class="nav-style">
<img class="bird-style" src="/nav/img/bird.jpg">
<a href="#">首页</a>
<a href="#">产品</a>
<a href="#">文档</a>
<a href="#">帮助</a>
</nav>
</body>
</html>
把a标签的宽度去掉,行内元素设置宽高是无效的。
图片不要padding和margin了。
a和图片的vertical-align都设为middle试试看。