导航栏的这种效果怎么实现 一级菜单 绑定 mouseover事件 触发时 弹出二级菜单 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个谁不知道啊,来段代码,分析一下嘛!<!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" /><title>Slide</title><script src="http://code.jquery.com/jquery-1.10.2.min.js"></script><script type="text/javascript"> $(document).ready(function(){ $(".flip").mouseover(function(){ $(this).next().slideDown(500); }); $(".content").mouseleave(function(){ $(this).children().next().slideUp(500); });});</script> <style type="text/css"> div.panel,p.flip{ margin:0px;padding:5px;text-align:center; border:solid 1px #c3c3c3;}div.panel{ height:120px;display:none;}</style> <body> <div class="content" style="display:block;width:300px;"><p class="flip">滑过这里</p><div class="panel"><p>11111111111111111</p><p>2222222222222222222222</p></div> </div><div class="content" style="display:block;width:300px;"><p class="flip">滑过这里</p><div class="panel"><p>11111111111111111</p><p>2222222222222222222222</p></div> </div></body></html>类似这样的 你可以参考下 要是我,我就用滑动门!以下是简单的滑动门的例子:<!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=gb2312" /><title>滑动门</title><style media="screen" type="text/css"><!--*{font-size:12px;}html,body{margin:0;text-align:center;over-flow:hidden;height:100%;width:100%;}UL{list-style-type:none; margin:0px;}/* 标准盒模型 */.ttl{height:18px;}.ctt{height:auto;padding:6px;clear:both;border:1px solid #064ca1;border-top:0;text-align:left;}.w936{margin:2px 0;clear:both;width:936px;/*滑动门的宽度*/}/* TAB 切换效果 */.tb_{background-image: url('/jscss/demoimg/200901/tabs1.gif'); background-repeat: repeat-x;background-color: #E6F2FF;}.tb_ ul{height:24px;}.tb_ li{float:left;height: 24px;line-height:1.9;width: 94px;cursor:pointer;}/* 控制显示与隐藏css类 */.normaltab { background-image:url('/jscss/demoimg/200901/tabs2.gif'); background-repeat: no-repeat; color:#1F3A87 ;}.hovertab { background-image: url('/jscss/demoimg/200901/tabs3.gif'); background-repeat: no-repeat; color:#1F3A87; font-weight:bold }.dis{display:block;}.undis{display:none;}--></style><script type="text/javascript" language="javascript">//<!CDATA[function g(o){return document.getElementById(o);}function HoverLi(n){//如果有N个标签,就将i<=N;for(var i=1;i<=6;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';}//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;//]]></script></head><body><div class="w936"> <div id="tb_" class="tb_"> <ul> <li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);"> ASP.NET</li> <li id="tb_2" class="normaltab" onmouseover="i:HoverLi(2);"> MYSQL</li> <li id="tb_3" class="normaltab" onmouseover="a:HoverLi(3);"> DELPHI</li> <li id="tb_4" class="normaltab" onmouseover="o:HoverLi(4);"> VB.NET</li> <li id="tb_5" class="normaltab" onmouseover="g:HoverLi(5);"> JAVA</li> <li id="tb_6" class="normaltab" onmouseover="z:HoverLi(6);"> PHP5</li> </ul> </div> <div class="ctt"> <div class="dis" id="tbc_01">这里是ASP.NET的相关内容</div> <div class="undis" id="tbc_02">这里是MYSQL的相关内容</div> <div class="undis" id="tbc_03">这里是DELPHI的相关内容</div> <div class="undis" id="tbc_04">这里是VB.NET的相关内容</div> <div class="undis" id="tbc_05">这里是JAVA的相关内容</div> <div class="undis" id="tbc_06">这里是PHP5的相关内容</b> </div> </div></div></body></html> JavaScript Automation 服务器不能创建对象 ActiveXObject MSComDlg.CommonDialog JavaScript图片连续滚动的问题 js获取相同名称标签的值 jQuery VS JavaScript! 如何用Url传参 关于表格操作遇到的郁闷的问题 问题关于ie后退按钮的怪异问题 Vml:Textpath元素,如何设置string 的对齐方式? 为什么csdn不把左边树的解决方案贴出来 通过鼠标拖动改变二个表格格宽度 帮忙写个显示隐藏的jquery代码 急~ window.setInterval() 频率会变快。请前辈们帮忙看看。
<!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" />
<title>Slide</title>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").mouseover(function(){
$(this).next().slideDown(500);
});
$(".content").mouseleave(function(){
$(this).children().next().slideUp(500);
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
<body>
<div class="content" style="display:block;width:300px;">
<p class="flip">滑过这里</p>
<div class="panel">
<p>11111111111111111</p>
<p>2222222222222222222222</p>
</div>
</div>
<div class="content" style="display:block;width:300px;">
<p class="flip">滑过这里</p>
<div class="panel">
<p>11111111111111111</p>
<p>2222222222222222222222</p>
</div>
</div>
</body>
</html>
类似这样的 你可以参考下
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>滑动门</title>
<style media="screen" type="text/css">
<!--
*{font-size:12px;}
html,body{margin:0;text-align:center;over-flow:hidden;height:100%;width:100%;}
UL{list-style-type:none; margin:0px;}
/* 标准盒模型 */
.ttl{height:18px;}
.ctt{height:auto;padding:6px;clear:both;border:1px solid #064ca1;border-top:0;text-align:left;}
.w936{margin:2px 0;clear:both;width:936px;/*滑动门的宽度*/}
/* TAB 切换效果 */
.tb_{background-image: url('/jscss/demoimg/200901/tabs1.gif'); background-repeat: repeat-x;background-color: #E6F2FF;}
.tb_ ul{height:24px;}
.tb_ li{float:left;height: 24px;line-height:1.9;width: 94px;cursor:pointer;}
/* 控制显示与隐藏css类 */
.normaltab { background-image:url('/jscss/demoimg/200901/tabs2.gif'); background-repeat: no-repeat; color:#1F3A87 ;}
.hovertab { background-image: url('/jscss/demoimg/200901/tabs3.gif'); background-repeat: no-repeat; color:#1F3A87; font-weight:bold }
.dis{display:block;}
.undis{display:none;}
-->
</style>
<script type="text/javascript" language="javascript">
//<!CDATA[
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=6;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
//]]>
</script>
</head>
<body>
<div class="w936">
<div id="tb_" class="tb_">
<ul>
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);">
ASP.NET</li>
<li id="tb_2" class="normaltab" onmouseover="i:HoverLi(2);">
MYSQL</li>
<li id="tb_3" class="normaltab" onmouseover="a:HoverLi(3);">
DELPHI</li>
<li id="tb_4" class="normaltab" onmouseover="o:HoverLi(4);">
VB.NET</li>
<li id="tb_5" class="normaltab" onmouseover="g:HoverLi(5);">
JAVA</li>
<li id="tb_6" class="normaltab" onmouseover="z:HoverLi(6);">
PHP5</li>
</ul>
</div>
<div class="ctt">
<div class="dis" id="tbc_01">这里是ASP.NET的相关内容</div>
<div class="undis" id="tbc_02">这里是MYSQL的相关内容</div>
<div class="undis" id="tbc_03">这里是DELPHI的相关内容</div>
<div class="undis" id="tbc_04">这里是VB.NET的相关内容</div>
<div class="undis" id="tbc_05">这里是JAVA的相关内容</div>
<div class="undis" id="tbc_06">这里是PHP5的相关内容</b>
</div>
</div>
</div>
</body>
</html>