+ -
当前位置:首页 → 问答吧 → 急~~~跪求 这个效果怎么做呀?

急~~~跪求 这个效果怎么做呀?

时间:2009-06-15

来源:互联网

这个效果怎么 用jquery做 但效果不好啊
图片:
tab页?
几个DIV轮流切换嘛~

作者: anad007   发布时间: 2009-06-15

    

作者: zhumq1982   发布时间: 2009-06-20

   hhh

作者: chenhaiyang   发布时间: 2009-06-22

很多这种插件~效果也不错的说~

不过一般的都是控制ul->li的

作者: chenhaiyang   发布时间: 2009-06-22

自己写,不会超过10行代码的。
注意使用index

作者: kazaff   发布时间: 2009-06-24

复制代码
  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=utf-8" />
  5. <title>jQuery Tabs By Await [url]http://leotheme.cn/[/url]</title>
  6. <style>
  7. * { margin:0 auto; padding:0; font-family:"宋体",Arial, Helvetica, sans-serif; font-size:12px; }
  8. ul { list-style: none;}
  9. p {width: 450px; border:1px solid #88AAD6; padding: 5px 10px; text-align: right;}
  10. .tabbox{ position: relative; width:450px; height: 140px; margin:0 auto; border:1px solid #88AAD6; margin-top: 100px; padding: 10px;}
  11. .tabnavi { position: relative; left: 0; top: 0; z-index: 999; float: left;}
  12. .tabnavi li{ width:80px; height:24px; font-weight:bold; line-height: 24px; margin: 10px 0; border:1px solid #88AAD6; background:#eeeeff; color:#999; text-align:center;}
  13. .tabnavi li.current{ background:#fff; border-right: 1px solid #fff; color:#290052; }
  14. .tabContent{ position: relative; z-index: 99;float:left; margin-left: -1px; border:1px solid #88AAD6; padding:10px; width:347px; height:120px; }
  15. .clear {clear: both;}
  16. </style>
  17. <script type="text/javascript" src="http://leotheme.cn/wp-includes/js/jquery/jquery.js"></script>
  18. <script>
  19. $(function(){
  20.    $(".tabContent div:not(:first)").hide();
  21.    $(".tabnavi li").each(function(index){
  22.        $(this).click(
  23.              function(){
  24.               $(".tabnavi li.current").removeClass("current");
  25.               $(this).addClass("current");
  26.               $(".tabContent > div:visible").hide();
  27.               $(".tabContent div:eq(" + index + ")").show();
  28.       })
  29.    })
  30. })
  31. </script>
  32. </head>
  33. <body>
  34. <div class="tabbox">
  35.     <ul class="tabnavi">
  36.         <li class="current">首页</li>
  37.         <li>关于</li>
  38.         <li>相册</li>
  39.     </ul>
  40.     <div class="tabContent">
  41.         <div>[url]http://leotheme.cn/[/url]</div>
  42.         <div>[url]http://leotheme.cn/about[/url]</div>
  43.         <div>[url]http://leotheme.cn/photo[/url]</div>
  44.     </div>
  45.     <div class="clear"></div>
  46. </div>
  47. <p>By Await 2009:06:11</p>
  48. </body>
  49. </html>

作者: Noker   发布时间: 2009-06-24

    

作者: await   发布时间: 2009-06-26

相关阅读 更多