我正在尝试获得一个水平导航栏,但我无法让它正常工作。
nav {
text-align: center;
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
}
nav ul li {
display: inline;
}
nav ul li a {
text-decoration: none;
display: block;
width: 80px;
}
最佳答案
关于html - 导航菜单不会水平排列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22404921/