[英]Responsive navigation bar responsive issue
okay so, im trying to make my navigation bar responsive and im having some troubles好的,我正在尝试使我的导航栏响应,但我遇到了一些麻烦
my html and my css我的 html 和我的 css
@media (max-width: 600px) {
.toggle-btn {
display: flex;
}
.logo {
display: none;
}
header {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.row ul {
display: flex;
flex-direction: column;
}
}
<header>
<div class="container">
<a href="" class="toggle-btn">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</a>
<div class="row">
<a href="index.html" class="logo"><img src="myLogo.png"></a>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Support</a></li>
</ul>
</nav>
</div>
</div>
</header>
okay so, i made the li's display in a column so far.好的,到目前为止,我已经在列中显示了 li。 And now i want to get them to the center of the page.现在我想让它们到页面的中心。 And i have tried so so much like justify-content: center;我已经尝试了很多,比如 justify-content: center; and justify-items: center;和 justify-items: center; and text-align center;和文本对齐居中; i dont know how to do this could someone help please?我不知道该怎么做,有人可以帮忙吗?
Thanks :)谢谢 :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.