<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=7" /><title>下拉菜单</title></head><body><style>body,html{background:none;padding:0;margin:0}#span_my_toolbar{padding-right: 5px;}#my_toolbar{text-align: left;position: absolute;left: 0px;top: 16px;overflow:hidden;width: 110px;z-index: 9999;background: white;border: 1px solid #CCC;padding: 5px 0 2px 5px;font-size: 12px;}#my_toolbar li{padding:0;margin:0;height:20px;line-height:20px;background-repeat: no-repeat;}#my_toolbar li a{color:#000;}</style><script type="text/javascript" src="jquery.min.js"></script><script type="text/javascript"><!--
$(document).ready(function() {
$("#lnk_my_toolbar").mouseover(function(){
$("#my_toolbar").stop(false, true).show();
$("#lnk_my_toolbar").addClass('hover');
});
$("#span_my_toolbar").mouseleave(function(){
$("#my_toolbar").stop(false, true).hide();
$("#lnk_my_toolbar").removeClass('hover');
});
});//--></script><span style="position:relative;" id="span_my_toolbar"><a href="/" id="lnk_my_toolbar">下拉项目</a><ul id='my_toolbar'>
<li><a href='/'>123</a></li>
<li><a href='/'>321</a></li>
<li><a href='/'>1234567</a></li>
<li><a href='/'>888</a></li>
<li><a href='/'>999</a></li></ul></span></body></html>
1 回答
喵喔喔
TA贡献1735条经验 获得超5个赞
#span_my_toolbar { background:url('/img/icons.gif') no-repeat 58px -218px; padding-right:5px; }#span_my_toolbar a#lnk_my_toolbar.hover {background:#40AA53;color:#fff;}#my_toolbar { display:none; text-align:left; position:absolute; left:0px; top:16px; width:110px; z-index:9999; background:#fff; border:1px solid #ccc; padding:5px 0 2px 5px; font-size:9pt; list-style-type:none; }
添加回答
举报
0/150
提交
取消