Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[疑难] 导航求助

[复制链接]
liuyi19870 发表于 2010-1-1 22:02:16 | 显示全部楼层 |阅读模式
本帖最后由 liuyi19870 于 2010-01-01 22:05 编辑

高手帮下忙 怎样修改下面代码中的CSS 可以在ss中使用   本人新手不会 不胜感激
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  5. <title>CSS仿支付宝菜单</title>
  6. <style type="text/css">
  7. * { padding:0px; margin:0px; list-style:none; }
  8. body { font-size:14px; font-family:Verdana, Geneva, sans-serif; }
  9. #nav ul.nav_left, #nav ul.nav_right, #nav ul.nav_main li, #nav ul.nav_main li.over a, #nav ul.nav_main li a span, #nav ul.nav_main li.over a span { background:url(/uploads/userup/0910/liehuonet091013b.gif) no-repeat; }
  10. #nav { background:url(/uploads/userup/0910/liehuonet091013b.gif) repeat-x; }
  11. #wrap { width:960px; margin:0 auto; height:auto; overflow:hidden; padding-top:50px; }
  12. #nav { background-position: 0 -178px; height:79px; width:960px; }
  13. #nav ul.nav_left { background-position: 0 0; float:left; width:10px; height:79px; display:inline; }
  14. #nav ul.nav_right { background-position:-20px 0; float:right; width:10px; height:79px; display:inline; }
  15. #nav ul.nav_main { float:left; display:inline; }
  16. #nav ul.nav_main li { background-position: -41px 0; float:left; padding:0 5px; }
  17. #nav ul.nav_main li a { height:40px; display:block; text-decoration:none; float:left; }
  18. #nav ul.nav_main li.over a { background-position: 0 -85px; }
  19. #nav ul.nav_main li a span { background-position: right -90px; height:22px; display:block; padding-right:30px; padding-left:20px; padding-top:18px; color:#fff; font-weight:bold; overflow:hidden; cursor:pointer; float:left; margin-left:15px; display:inline; }
  20. #nav ul.nav_main li.over a span { background-position: right -130px; color:#555; }
  21. #nav ul.nav_main li#show_0 { background:none; }
  22. </style>
  23. <script type="text/javascript">
  24. function $(id) {
  25.   return document.getElementById(id);
  26. }
  27. window.onload = function() {
  28.   var Root = $("nav_li").getElementsByTagName("li");
  29.   for (var i = 0; i < Root.length; i++) {
  30.     c = Root[i];
  31.     c.setAttribute("id", "show_" + i);
  32.     var xp = function(i) {
  33.       show(i);
  34.     };
  35.     c.onmouseover = dete_bibao(xp, i, c);
  36.   }
  37. }
  38. function show(j) {
  39.   for (var n = 0; n <= 6; n++) {
  40.     if ($("show_" + n).className != "s") {
  41.       $("show_" + n).className = "s";
  42.     }
  43.         
  44.     if (n == j) {
  45.       $("show_" + n).className = "over";
  46.     }
  47.   }
  48. }
  49. function dete_bibao(fn, params, obj) {
  50.   return function() {
  51.     fn.call(obj || window, params);
  52.   }
  53. }
  54.                   </script>
  55. </head>
  56. <body>
  57. <div id="wrap">
  58. <div id="nav">
  59. <ul class="nav_left">
  60. </ul>
  61. <ul class="nav_main" id="nav_li">
  62. <li><a href="http://www.liehuo.net/" _fcksavedurl="http://www.liehuo.net/"><span>网站首页</span></a></li>
  63. <li><a href="http://www.liehuo.net/news/" _fcksavedurl="http://www.liehuo.net/news/"><span>站长新闻</span></a></li>
  64. <li><a href="#" _fcksavedurl="#"><span>资源下载</span></a></li>
  65. <li><a href="#" _fcksavedurl="#"><span>网页特效</span></a></li>
  66. <li><a href="#" _fcksavedurl="#"><span>网络编程</span></a></li>
  67. <li><a href="#" _fcksavedurl="#"><span>休闲电影</span></a></li>
  68. <li><a href="http://bbs.liehuo.net/" _fcksavedurl="#"><span>论坛</span></a></li>
  69. </ul>
  70. <ul class="nav_right">
  71. </ul>
  72. </div>
  73. </div>
  74. </body>
  75. </html><br /><center>烈火网更多教程,请访问:<a href=http://www.liehuo.net/ target=_blank _fcksavedurl="http://www.liehuo.net/ target=_blank">http://www.liehuo.net/</a></center>
  76. 文章源自:烈火网,原文:http://www.liehuo.net/a/200910/139908.html
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-16 14:58 , Processed in 0.024671 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表