不完全确定你在问什么,但如果你想让你的流量水平,那么只需添加
display: flex
如下所示。
ul {
display: flex;
}
附言:你不需要在代码笔中添加html、body、head标签等,它应该只是body标签的内容。
附言:你也需要终止标签。
<!-- I define the <nav> tag in the <body> tag where i want to make the bar -->
<nav>
<ul> <!-- I define the <ul> tag, which is used to show the unordered list. And, then i define the list items in the <li> tag. I define those items which i want to show in the navigation bar. They are gonna go to href -->
<li><a href="#home">Home</a></li>
<li><a href="#history">History</a></li>
<li><a href="#strategies">Strategies</a></li>
<li><a href="#myGame">My Game</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<!-- I gave each anchor tag a corresponding div. When we click on the nav bar we are gonna go to those ids -->
<div id="home">Home</div>
<div id="history">History</div>
<div id="strategies">Strategies</div>
<div id="myGame">My Game</div>
<div id="contact">Contact</div>