【发布时间】:2015-03-09 15:16:49
【问题描述】:
我正在尝试创建类似于 Uber 网站的导航栏。左边是菜单按钮,中间是logo,右边是登录和注册。
我使用了 div container="pull-right" 仍然无法让标题居中。这些按钮的风格不会比它们现在的样式更多,因为它们将位于白色背景上。
<div class="nav">
<div class="container">
<ul>
<a href="www.google.com"<li><button class="Menu">MENU</button></li></a>
<a href="www.google.com"<li><button class="TITLE">TITLE</button></li></a>
<a href="google.com"<li><button class="Sign Up">SIGN UP</button></li></a>
<a href="google.com"<li><button class="Log in">LOG IN</button></li></a>
</ul>
</div>
</div>
.nav{
color: #5a5a5a;
font-size: 15px;
font-weight: normal;
padding: 15px 15px 5px 5px;
word-spacing: 3px;
}
.nav li {
display: inline;
}
.nav button {
background-color: Transparent;
background-repeat:no-repeat;
border: none;
cursor:pointer;
overflow: hidden;
outline: none;
}
.nav a{
color: inherit;
}
这是我的 Jsfiddle:https://jsfiddle.net/tokyothekid/r19y23ep/1/
【问题讨论】:
-
不太清楚你的问题是什么。
-
您的代码不正确,您在 中使用了
- ,但未正确关闭
-
在其他新闻中,欢迎来到 Stack Overflow。您可能会发现发送tour 很有用。我建议您对您认为有用的答案进行投票,最终您希望通过单击答案旁边的复选标记来选择“正确答案”。