第1款插件:Semantic Tabs可以简单地制作Tabs菜单

Semantic Tabs可以简单地制作Tabs菜单

官方链接: http://plugins.jquery.com/semantictabs
JS下载: http://ijquery.360sites.cn/js/jquery.semantictabs.js

如图:


引用代码:
  1. <script type="text/javascript" charset="utf-8" src="http://ijquery.360sites.cn/js/jquery-1.3.2.min.js"></script>
  2. <script type="text/javascript" charset="utf-8" src="http://ijquery.360sites.cn/js/jquery.semantictabs.js"></script>
复制代码
HTML代码:
  1. <div id="mytabset">
  2.     <div class="panel">
  3.         <h3>标签1</h3>
  4.         面板1
  5.     </div>
  6.     <div class="panel">
  7.         <h3>标签2</h3>
  8.         面板2
  9.     </div>
  10.     <div class="panel">
  11.         <h3>标签3</h3>
  12.         面板3
  13.     </div>
  14. </div>
复制代码
JQuery代码:
  1. <script>
  2.     $(function () {
  3.         $('#mytabset').semantictabs({
  4.             panel:'panel',    //-- Selector of individual panel body
  5.             head:'h3',            //-- Selector of element containing panel header
  6.             active:':first'    //-- Which panel to activate by default
  7.         });
  8.     });
  9. </script>
复制代码
CSS代码:

  1. #mytabset {
  2.         width: 100%;
  3. }

  4. .panel {
  5.         border: 1px solid #ccc;
  6. }

  7. /*semantic tabs*/
  8. ul.semtabs {
  9.         margin: 0 auto;
  10.         clear: both;
  11.         border-bottom: 4px solid #4c77b3;
  12.         height: 25px;
  13.         list-style: none !important;
  14. }

  15. ul.semtabs li {
  16.         float: left;
  17.         height: 30px;
  18.         display: block;
  19.         margin: 0 !important;
  20.         background-image: none;
  21. }

  22. ul.semtabs li a {
  23. /*  height:15px;*/
  24.         line-height: 15px;
  25.         display:block;
  26.         padding: 5px 3em;
  27.         text-decoration: none;
  28.         font-weight: bold;
  29.         background-color: #e6eeee;
  30. }

  31. ul.semtabs li.active a {
  32.         background-color: #4c77b3;
  33.         color: #fff;
  34. }
  35. /*end semantic tabs*/
复制代码
[转] http://ijquery.360sites.cn/forum.php?mod=viewthread&tid=1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值