求助网页导航条里的超链接文字不是横排

仲冬廿七 仲冬廿七 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

HTml:<body>
<div class="nav">
<div class="public-width">
<div class="nav-logo">
<img src="img/logo.png" alt="">
</div>
<div class="nav-list">
<ul>
<li>
<a href="">首页</a>
</li>
</ul>
<ul>
<li>
<a href="">页2</a>
</li>
</ul>
<ul>
<li>
<a href="">页3</a>
</li>
</ul>
<ul>
<li>
<a href="">页4</a>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
CSS:*{
margin: 0;
padding: 0;
}
body{
font-size: 16px;
color: #333;
}
li{
list-style: none;
}
a{
text-decoration: none;
}
.nav{
width: 100%;
height: 80px;
box-shadow: 2px 3px 5px #ccc;
}
.public-width{
width: 1200px;
margin: auto;
}
.nav.public-width{
display: flex;
height: 80px;
justify-content: start;
align-items: center;
}
.nav-logo{
width: auto;
height: 60px;
}
.nav-logo img{
display: block;
width: auto;
height: 100%;
}
.nav-list {
margin-left: 30px;
height: 100%;
}
.nav-list ul{
display: flex;
height: 100%;
justify-content: start;

}
.nav-list ul li{
width: auto;
padding: 0 10px;
}
.nav-list ul li a{
color: #333;
}
是哪个环节出问题了
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
仲冬廿七
CSS 61,116 成员 60,701 内容