如何製作漂亮的頁眉/導航欄目?導航之間的空間
這是我的代碼:
body {
margin: 0px;
}
.container {
width: auto;
height: 1920px;
background-color: #514367;
}
header {
width: 100%;
height: 70px;
background-color: #647551;
top: 0px;
}
nav ul {
margin: 0px;
padding: 24px 0px 5px 30px;
}
nav li {
margin-right: 40px;
list-style: none;
text-decoration: none;
display: inline;
}
nav li a {
text-decoration: none;
}
<!DOCTYPE html>
<html>
<head>
<link href="css/Main.css" type="text/css" rel="stylesheet" />
<meta charset="utf-8">
<title>Talkody - Design Services</title>
</head>
<body>
<div class="container">
<!-- Menu start -->
<header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about/index.html">About</a></li>
<li><a href="portfolio/index.html">Portfolio</a></li>
<li><a href="contact/index.html">Contact</a></li>
</ul>
</nav>
</header>
<!-- Menu end -->
</div>
</body>
</html>
所以,我想。我希望中間的文字多一點。等等,讓我們用另一種方式來講述它。你會看到上面的'StackExchange'導航欄?那麼,那就是我想要的。我想要右邊的文字(但居中放置在中間區域),然後在左邊放置一個徽標(但也以中間區域爲中心)。
我試圖改善我在HTML5中的承認。所以我開始使用nav和header函數。
引導導航欄做同樣的事情,他們也響應移動視圖。你可以在http://v4-alpha.getbootstrap.com/components/navbar/ –
查看它們,這很有幫助,但我想探索HTML5世界。我不喜歡複製東西等。有沒有另一種方式,而不是Bootstrap? – Gilles