帮我提取hao123.com下拉菜单代码,谢谢。

yepaos 2012-11-18 11:35:55
帮我提取hao123.com下拉菜单代码,谢谢。对于大侠这不是个问题。如图的下拉菜单,代码应该比较简洁的吧。
...全文
924 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yepaos 2012-11-20
  • 打赏
  • 举报
回复
<!doctype html><html><!--STATUS OK--> <head> <meta charset="utf-8"/> <base target="_blank"/> <title>hao123</title> <script type="text/javascript"> var pageId="hao123-indexnu"; try{document.execCommand('BackgroundImageCache',false,true)}catch(e){} </script> <link rel="stylesheet" type="text/css" href="http://s0.hao123img.com/v3/xf/RD/fH/Hs/Qe/7/skin-color-green.merge.css" /> </head> <body class="skin-color-green"><div class="g_hf-bg layout-userbar"> <span class="box-logo"><a id="indexLogo" href="http://hi.baidu.com/hao123/home" title=" hao123Ŀռ" hidefocus="true"><img src="http://s1.hao123img.com/index/images/newlogo-186X68.png" width="186" height="68" /></a></span> </div> <span class="widget-sitelinks js_famoussitegroup" monkeyExtra="{"zhanqun":""}"><a href="http://www.icbc.com.cn/">7777</a> <i class="open-up js_openup"></i> <div class="bg-box js_bgbox" style="display:none"> <div class="site-inner"> <a class="site-item" href="http://www.boc.cn/">88888</a> <a class="site-item" href="http://www.ccb.com/">9999</a> <a class="site-item" href="http://www.cmbchina.com/">aaaa</a> <a class="site-item" href="http://www.bankcomm.com/">ssss</a> <a class="site-item" href="http://www.abchina.com/">dddd</a> <a class="site-item" href="http://www.psbc.com/">ffff</a></div></div></span> <script type="text/javascript" src="http://s1.hao123img.com/v3/00/VY/bf/1c/fn/4/jquery.js"></script> <script type="text/javascript" src="http://s0.hao123img.com/v3/_v/Lz/sT/xn/03/hao123.js"></script> <script type="text/javascript"> xAjax("__ajax__","__session__"," ","__noscript__"); var isStatic=0, isLanding=0, username=null, gotourl="http%3A%2F%2Fwww.hao123.com%2F", recommendCount=0, left=$('.layout-content-slider'), right=$('.layout-content-ct'), normalLeftHeight=left.height()-1000, arrBaiduAds = [], antic=(function(_){var A=((self!==top)||(!!window.opener))?1:0,_ref=encodeURIComponent(_.referrer);return{embed:A,ref:_ref}})(document), UA2Config={id:"hao123-index",action:"http://www.hao123.com/images/",rate:100}, isSiteUser=1,allSites=$('#site .js_site-item'); $.hao123.cookie.del("skinFolder"); if(allSites.length>0&&allSites.attr('data-id')<10000){isSiteUser=0;} (function(log,lc,o){var lat=lc.localcookie('cookie','LAT');lc.localcookie('cookie','LAT', +new Date);if(!log)return;log.conf={data:{level:1,page:"index"}};o.type="access";log.send(o);o.type="flash";o.lastAccess=lat||0;lc.localcookie('wait',function(){log.send(o);})})($.hao123.log,$.hao123.localcookie.getInstance(),{embed:antic.embed,ref:antic.ref,pageId:pageId,isSiteUser:isSiteUser}); (function(){var t;if(Math.random()<0.01){t=+new Date;$.hao123.log.heartbeat({type:"heartbeat",sessionid:t,staytime:function(){return (+new Date)-t;}},function(i){var a=Math.pow(i-1,2),b=Math.pow(i,2);return (a+((b-a)*Math.random()))*1000;});}})(); $.hao123.searchInit(); hao.header(); hao.userbar(false,isStatic); hao.famoussite(); hao.coolsite(); hao.toolsite(); hao.surprise("#box-surprise"); //$.hao123.starbar(); hao.uvfix(); ajust(); $.hao123.siteLog($('#site')); $('#site').site({isLanding:isLanding,userName:username,recommendCount:recommendCount,isStatic:isStatic}).bind('sitebackclick siterecovered siterefresh siteshowrefresh',function(){ajust();}); function ajust(){if(right.height() < normalLeftHeight){left.height(normalLeftHeight);}else{left.height(right.get(0).offsetHeight-1);}} $.getScript("http://a.baidu.com/ecom?di=214&tm=baidufsbanner",function(){if(arrBaiduAds&&arrBaiduAds["214"]){$("#ads214").html(arrBaiduAds["214"]);}}); $.ajax({type:'get',url:'http://s0.hao123img.com/v1/Av/oj/5q/dM/Px/H/monkey.js',dataType:'script',cache:true}); </script> <script type="text/javascript">hao.toplist2(); </script> </body></html><!--5c46ff3f--> 帮我删除那个多余的东西,我删除了一点就没有下拉的效果了,水平问题。
yepaos 2012-11-20
  • 打赏
  • 举报
回复
<!doctype html><html><!--STATUS OK--> <head> <meta charset="utf-8"/> <base target="_blank"/> <meta name="keywords" content=",ַȫ,ַ,hao123,hao123ַ,hao123,hao123ַȫ" /> <meta name="description" content="hao123Ȩ㼯վԴʱ¼Ӱӡ֡˵Ϸȷַݣ򵥾ʡhao123ʼ" /> <meta property="qc:admins" content="635302267760171236375" /> <title>hao123_↑ʼ</title> <!--[if gte IE 9]> <meta name="application-name" content="hao123 ҵҳ" /> <meta name="msapplication-tooltip" content="hao123 ҵҳ" /> <meta name="msapplication-window" content="width=1024;height=768" /> <meta name="msapplication-task" content="name=ʵѯ;action-uri=http://www.hao123.com/tools/tool.html?pin;icon-uri=http://www.hao123.com/images/tool.ico" /> <meta name="msapplication-task" content="name=Ӿ;action-uri=http://tv.hao123.com/?pin;icon-uri=http://www.hao123.com/images/tv.ico" /> <meta name="msapplication-task" content="name=Ӱ;action-uri=http://movie.hao123.com/?pin;icon-uri=http://www.hao123.com/images/movie.ico" /> <meta name="msapplication-task" content="name=;action-uri=http://music.hao123.com/?pin;icon-uri=http://www.hao123.com/images/music.ico" /> <meta name="msapplication-task" content="name=Ź;action-uri=http://tuan.baidu.com/?pin;icon-uri=http://www.hao123.com/images/tuan.ico" /> <meta name="msapplication-task" content="name=Ϸ;action-uri=http://xyx.hao123.com/?pin;icon-uri=http://www.hao123.com/images/game.ico" /> <meta name="msapplication-task" content="name=;action-uri=http://feedback.hao123.com/?pin&catalog_id=3;icon-uri=http://www.hao123.com/images/haofav.ico" /> <meta name="msapplication-starturl" content="http://www.hao123.com" /> <link rel="shortcut icon" href="http://www.hao123.com/images/haofav.ico" type="image/x-icon" /> <![endif]--> <script type="text/javascript"> var pageId="hao123-indexnu"; try{document.execCommand('BackgroundImageCache',false,true)}catch(e){} </script> <link rel="stylesheet" type="text/css" href="http://s0.hao123img.com/v3/xf/RD/fH/Hs/Qe/7/skin-color-green.merge.css" /> </head> <body class="skin-color-green"><div class="g_hf-bg layout-userbar"> <div class="w960px layout-inner"> <div id="box-userbar" class="box-userbar"> <div id="userBar" class="w960px g_clr widget-userbar" monkey="userbar"> <div class="g_fl"> <span class="box-logo"><a id="indexLogo" href="http://hi.baidu.com/hao123/home" title=" hao123Ŀռ" hidefocus="true"><img src="http://s1.hao123img.com/index/images/newlogo-186X68.png" width="186" height="68" /></a></span> </div> <div class="g_fr"> </div> <div class="widget-famoussite" monkey="famoussite"> <div class="wf-line"></div> <div class="g_clr wf-inner last"> <span class="widget-sitelinks js_famoussitegroup" monkeyExtra="{"zhanqun":""}"><a href="http://www.icbc.com.cn/">7777</a> <i class="open-up js_openup"></i> <div class="bg-box js_bgbox" style="display:none"> <div class="site-inner"> <a class="site-item" href="http://www.boc.cn/">88888</a> <a class="site-item" href="http://www.ccb.com/">9999</a> <a class="site-item" href="http://www.cmbchina.com/">aaaa</a> <a class="site-item" href="http://www.bankcomm.com/">ssss</a> <a class="site-item" href="http://www.abchina.com/">dddd</a> <a class="site-item" href="http://www.psbc.com/">ffff</a></div></div></span> <script type="text/javascript" src="http://s1.hao123img.com/v3/00/VY/bf/1c/fn/4/jquery.js"></script> <script type="text/javascript" src="http://s0.hao123img.com/v3/_v/Lz/sT/xn/03/hao123.js"></script> <script type="text/javascript"> xAjax("__ajax__","__session__"," ","__noscript__"); var isStatic=0, isLanding=0, username=null, gotourl="http%3A%2F%2Fwww.hao123.com%2F", recommendCount=0, left=$('.layout-content-slider'), right=$('.layout-content-ct'), normalLeftHeight=left.height()-1000, arrBaiduAds = [], antic=(function(_){var A=((self!==top)||(!!window.opener))?1:0,_ref=encodeURIComponent(_.referrer);return{embed:A,ref:_ref}})(document), UA2Config={id:"hao123-index",action:"http://www.hao123.com/images/",rate:100}, isSiteUser=1,allSites=$('#site .js_site-item'); $.hao123.cookie.del("skinFolder"); if(allSites.length>0&&allSites.attr('data-id')<10000){isSiteUser=0;} (function(log,lc,o){var lat=lc.localcookie('cookie','LAT');lc.localcookie('cookie','LAT', +new Date);if(!log)return;log.conf={data:{level:1,page:"index"}};o.type="access";log.send(o);o.type="flash";o.lastAccess=lat||0;lc.localcookie('wait',function(){log.send(o);})})($.hao123.log,$.hao123.localcookie.getInstance(),{embed:antic.embed,ref:antic.ref,pageId:pageId,isSiteUser:isSiteUser}); (function(){var t;if(Math.random()<0.01){t=+new Date;$.hao123.log.heartbeat({type:"heartbeat",sessionid:t,staytime:function(){return (+new Date)-t;}},function(i){var a=Math.pow(i-1,2),b=Math.pow(i,2);return (a+((b-a)*Math.random()))*1000;});}})(); $.hao123.searchInit(); hao.header(); hao.userbar(false,isStatic); hao.famoussite(); hao.coolsite(); hao.toolsite(); hao.surprise("#box-surprise"); //$.hao123.starbar(); hao.uvfix(); ajust(); $.hao123.siteLog($('#site')); $('#site').site({isLanding:isLanding,userName:username,recommendCount:recommendCount,isStatic:isStatic}).bind('sitebackclick siterecovered siterefresh siteshowrefresh',function(){ajust();}); function ajust(){if(right.height() < normalLeftHeight){left.height(normalLeftHeight);}else{left.height(right.get(0).offsetHeight-1);}} $.getScript("http://a.baidu.com/ecom?di=214&tm=baidufsbanner",function(){if(arrBaiduAds&&arrBaiduAds["214"]){$("#ads214").html(arrBaiduAds["214"]);}}); $.ajax({type:'get',url:'http://s0.hao123img.com/v1/Av/oj/5q/dM/Px/H/monkey.js',dataType:'script',cache:true}); </script> <script type="text/javascript">hao.toplist2(); </script> </body></html><!--5c46ff3f--> 去到这就担不了了,帮帮我!!
sxldfang 2012-11-19
  • 打赏
  • 举报
回复
给你个例子,你看看吧!
<!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>纵向导航及弹出菜单</title>
<style type="text/css">
#nav { font-size:12px; }
#nav hr { margin:0; padding:0; }
#nav ul { border:3px outset #bbb; list-style:none; padding:0; width:170px; background:#ccc; color:#666; }
#nav li { border:0px dotted gray; padding:8px 15px; position:relative; }
#nav ul ul { display:none; }
#nav li:hover { background: #FFF; color:red; cursor:pointer; font-weight:bold; }
#nav li:hover > ul { display:block;  position:absolute; top:-3px; left:160px;  font-weight:normal; }
</style>
</head>

<body>
<div id='nav'>
<ul>
  <li>学校首页</li>
  <li>学校概况 
    <ul>
      <li>学校概况</li>
      <li>领导关怀</li>
      <li>现任领导</li>
      <li>校园风光</li>
    </ul>
  </li>
  <li>管理机构
    <ul>
      <li> 办公室</li>
      <li>组织部</li>
      <li>宣传部</li>
      <li>人事处</li>
      <li>教务处</li>
      <li>学生处</li>
      <li>保卫处 </li>
    </ul>
  </li>
  <li>教学机构 
    <ul>
      <li>信息工程学院 
        <ul>
          <li>计算机信息管理专业</li>
          <li>软件技术</li>
          <li>信息安全技术</li>
          <li>计算机网络技术</li>
          <li>计算机应用技术</li>
          <li>电子信息工程技术</li>
        </ul>
      </li>
      <li>国际教育学院
        <ul>
          <li> 计算机网络技术专业</li>
          <li>国际经济与贸易专业</li>
          <li>旅游管理专业</li>
        </ul>
      </li>
      <li>音乐舞蹈学院
        <ul>
          <li> 音乐表演专业</li>
          <li>舞蹈表演专业</li>
        </ul>
      </li>
      <li>外国语学院 
        <ul>
          <li>商务英语专业</li>
          <li>旅游英语专业</li>
          <li>应用英语专业</li>
          <li>商务日语专业</li>
        </ul>
      </li>
      <hr />
      <li>化工食品学院</li>
      <li>工程技术学院</li>
      <li>经济贸易学院</li>
      <li>管理学院</li>
      <li>艺术设计学院</li>
      <li>文化与传播学院</li>
      <li>体育学院</li>
      <li>继续教育学院</li>
      <li>特殊教育学院</li>
      <li>软件职业学院</li>
    </ul>
  </li>
  <li>师资队伍 
    <ul>
      <li>师资建设</li>
      <li>学术交流</li>
    </ul>
  </li>
  <hr />
  <li>学术科研</li>
  <li>精品课程</li>
  <li>招生信息</li>
  <li>就业信息</li>
</ul>
</div>
</body>
</html>
  • 打赏
  • 举报
回复
我没有去看hao123的代码。只是想告诉你,达到这个效果有多种办法,第一个就是你说的 用下拉去实现然后修改下拉的样式,这个代价比较大并且兼容性差。你可以尝试用 JS 写一个点击事件,所谓的下拉其实就是一个层你 点击/移动到 它的位置上 它就出来。

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧