您好,我在功能下使用此菜单检查此网站
当您单击它时,我想让它上升而不是下降,有人知道我该怎么做吗?
这是菜单的代码
<div id="capabilities">CAPABILITIES</div>
<div id="bleft">
<ul class="menu1">
<li class="item1"><a href="#">TECH </a>
<ul>
<li class="subitem"><a href="#">Web hosting</a></li>
<li class="subitem"><a href="#">Internet Security and Penetration testing </a></li>
<li class="subitem"><a href="#">PCI/DSS compliance</a></li>
<li class="subitem"><a href="#">Development</a></li>
<li class="subitem"><a href="#">Custom web sites for portfolios</a></li>
<li class="subitem"><a href="#">Mobile apps </a></li>
</ul>
</li>
<li class="item2"><a href="#">GRAPHIC </a>
<ul>
<li class="subitem"><a href="#">Brands & Identity design </a></li>
<li class="subitem"><a href="#">Creative web design </a></li>
<li class="subitem"><a href="#">Graphic design </a></li>
</ul>
</li>
<li class="item3"><a href="#">MARKETING </a>
<ul>
<li class="subitem"><a href="#">Marketing strategy </a></li>
<li class="subitem"><a href="#">Email marketing </a></li>
<li class="subitem"><a href="#">Email template coding </a></li>
<li class="subitem"><a href="#">Telemarketing </a></li>
<li class="subitem"><a href="#">Graphic design </a></li>
<li class="subitem"><a href="#">White-hat SEO</a></li>
<li class="subitem"><a href="#">Google adwords optimization </a></li>
</ul>
</li>
</ul>
</div>
<script type="text/javascript">
$(function() {
var menu_ul = $('.menu1 > li > ul'),
menu_a = $('.menu1 > li > a');
menu_ul.hide();
menu_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu_a.removeClass('active');
menu_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
});
</script>
CSS
#capabilities
{
color:#fff;
font-family:myFirstFont;
font-size:24px;
float:right;
margin-top:10px;
margin-right:20px;
}
.menu1 {
float:right;
margin-top:275px;
text-decoration:none;
list-style:none;
font-size:24px;
margin-right:-95px;;
text-align:right;
width: 240px;
height: auto;
}
.menu1 > li > a {
display: block;
position: relative;
font-family: "myFirstFont";
color: #fff;
text-decoration:none;
}
.menu1 ul li a {
position: relative;
font-family: "myFirstFont";
font-size:18px;
margin-left: -190px;
color: #FC0;
text-decoration:none;
}
.menu1 ul li:last-child a {
list-style:none;
color: #FC0;
}
.menu1 > li > a:hover, .menu > li > a.active {
list-style:none;
color: #fff;
}
.menu1 > li > a.active {
list-style:none;
color: #fff;
}
.menu1 > li > a:before {
content: '◀';
font-size: 14px;
color: #fff;
height: 1em;
width: 1em;
position: absolute;
left: 0;
top: 50%;
margin: -.8em 0 0 17.8em;
}