当前的html
<html>
<head>
<link rel='stylesheet' type='text/css' href='css/styles.css' />
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'> </script>
</head>
<body>
<div id='cssmenu'>
<ul>
<li><a href='index.html'><span>Home</span></a></li>
<li><a href='team'><span>Team</span></a>
<ul class= "sub1">
<li><a href='team'><span>Team</span></a>
<li><a href='team'><span>Team2</span></a>
</ul>
</li>
<li><a href='sponsors'><span>Sponsors</span></a></li>
<li><a href='first'><span>First</span></a></li>
<li><a href='contact-us'><span>Contact Us</span></a></li>
<li class='last'><a href='handouts'><span>Handouts</span></a></li>
</ul>
</div>
</body>
</html>
的CSS
#cssmenu ul {
list-style-type: none;
position: relative;
display: block;
height: 33px;
font-size: 12px;
background: url(../images/bg.png) repeat-x top left;
font-family: Verdana, Helvetica, Arial, sans-serif;
border: 1px solid #000;
margin: 0;
padding: 0;
width: auto;
}
#cssmenu li {
display: block;
float: left;
margin: 0;
padding: 0;
}
#cssmenu li a {
float: left;
color: #A79787;
text-decoration: none;
height: 24px;
padding: 9px 15px 0;
font-weight: normal;
}
#cssmenu li a:hover,
#cssmenu .active {
color: #fff;
background: url(../images/bg.png) repeat-x top left;
text-decoration: none;
}
#cssmenu .active a {
color: #fff;
font-weight: 700;
}
#cssmenu ul {
background-color: #B11718;
}
#cssmenu li a:hover,
#cssmenu li.active {
background-color: #DE3330;
}
我尝试按照在线教程了解如何执行此操作,我听说它隐藏然后出现在块中。
<ul>
<li>
<ul>
<li></li>
<ul>
</li>
</ul>
如果我不正确的话,有点像这种格式......谁能帮我把当前菜单变成一个可能的下拉菜单。我按照教程进行操作,但它不会排列 Oo
请帮忙。对不起这个可怕的问题。它更多的是我将如何去做。