我可以使導航欄始終位於頂部嗎?如何將導航欄永久置於頂部?
我不是在說:position:fixed;事情......
與我的導航欄的問題是,當你放大出來它是不是在上面了......
我怎樣才能使它像這個網站的導航欄在哪裏總是在頂部時你把它縮小?
或
是有任何機會,我可以把它像Facebook的導航欄(在頂部的其中一個說家)
有一個固定的位置,但仍然是相同的放大或縮小時。
我的整個的CSS代碼是在這裏,如果你想查詢該網站的鏈接是導航欄的HTML是有也
:
感謝
\t ul.navbar{
\t float: left;
\t display: inline;
}
#hyper{
\t position: relative;
\t top: 70px;
\t z-index: -1;
\t opacity: 0.9;
}
a.navbar{
\t display: inline;
\t padding: 9px;
\t display: block;
\t float: left;
\t background-color: #009900;
\t text-decoration: none;
\t border-right: 53px solid red;
\t width: 70px;
}
a.navbar:hover{
\t color: #009900;
\t background-color: blue;
}
div.navbar{
\t border: 0px;
\t background-color: red;
\t width: 40000px;
\t height: 50px;
\t padding-top: 0px;
\t padding-bottom: 2px;
\t position: fixed;
\t bottom: 623px;
}
#link1,#link2,#link3,#link4,#link5,#link6,#link7{
\t position: relative;
\t bottom: 9px;
}
#cons{
\t position: relative;
\t top: 150px;
\t width: 250px;
\t z-index: -1;
}
h1{
\t color: yellow;
\t font-family: 'Press Start 2P', cursive;
\t text-align: center;
\t position: relative;
\t top: 40px;
\t opacity: 0.5;
}
h2{
\t color: #009900;
\t text-align: center;
\t font-family:'Orbitron', sans-serif;
\t position: relative;
\t top: 120px;
\t font-size: 60px;
}
#data{
\t color: #b2950b;
\t text-align: right;
\t font-family: 'Amatic SC', cursive;
\t position: relative;
\t top: 300px;
\t font-size: 17px;
}
#marq{
\t color: #fff;
\t background-color: black;
\t position: relative;
\t top: 70px;
\t font-family: 'Josefin Slab', serif;
}
<div id="dmenu" class="navbar">
<center>
<ul><a class="navbar" id="link1" href="index.html">HOME</a></ul>
<ul><a class="navbar" id="link2" href="index.html">GAMES</a></ul>
<ul><a class="navbar" id="link3" href="index.html">TUTORIAL</a></ul>
<ul><a class="navbar" id="link4" href="index.html">GAMERS</a></ul>
<ul><a class="navbar" id="link5" href="index.html">CONTACT</a></ul>
<ul><a class="navbar" id="link6" href="index.html">ABOUT</a></ul>
<ul><a class="navbar" id="link7" href="index.html">DONATE</a></ul>
</div>
</center>
請注意,HTML5中不支持'center'標記。 – GolezTrol
兩個都不是'marquee'。我的意思是,老兄! :p – GolezTrol