<!doctype html>
<html>
<head>
<title>My web page</title>
<link href="mycss.css" rel="stylesheet" type="text/css">
<h1>Welcome to my page!</h1>
<body>
<nav id="nav">
<ul>
<li>Home</li>
<li><a href="">About Me!</a>
<ul>
<li><a href="">Me!</a></li>
<li><a href="">Hobbies!</a></li>
<li><a href="">My Photography!</a></li>
<li><a href="">Favorite Music!</a></li>
</ul>
</li>
<li><a href="">Important Links</a>
<ul>
<li><a href="">L1</a></li>
<li><a href="">L2</a></li>
<li><a href="">L3</a></li>
<li><a href="">L4</a></li>
</ul>
</li>
<li><a href="">Contact</a></li>
</ul>
</nav>
<img src="http://http://upload.wikimedia.org/wikipedia/commons/a/a8/Sydney_harbour_bridge_new_south_wales.jpg" width="700" height="400" alt=""/>
<p>About Me</p>
<p>About Me</p>
</body>
</html>
CSS文件...大廈網頁
* {
text-align:center;
}
h1 {
}
nav {
display: block;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #202020;
list-style-type: none;
}
p {
display: block;
text-align: center;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: 202020;
position: relative;
}
img {
position: relative;
top: -5px;
}
#nav ul li {
display: inline-block;
list-style-type: none;
float: none;
padding-top: 5px;
background-color: #ACFE89;
padding-left: 30px;
padding-right: 30px;
position: relative;
padding-bottom: 5px;
color: #333366;
}
#nav ul li:hover {
color: #0099FF;
}
#nav ul li ul{
display:none;
position: absolute;
left: 0;
top: 100%;
}
#nav ul li ul li{
}
#nav ul li:hover > ul {
display:block;
}
a {
text-decoration: none;
}
嗨,我面臨着一些問題,此頁......
下拉菜單弄亂。 下拉菜單不在圖像後面。 導航欄上的所有項目在懸停時都不會突出顯示。
我是新來的,但盡我所能做一個很酷的網頁。請請幫助我!