淡隐淡现选项卡渐隐渐显tab标签
渐隐渐显tab标签,同样可以控制当前显示第几个项目
XML/HTML Code
- <div class="layout">
- <div class="row2">
- <div class="JQ-slide">
- <ul class="JQ-slide-nav">
- <li class="on">导航菜单</li>
- <li>表单</li>
- <li>焦点图</li>
- </ul>
- <div class="JQ-slide-content">
- <ul class="newsList">
- <li><a href="http://www.freejs.net/article_daohangcaidan_27.html">纯CSS的大型下拉菜单,支持放图片在下拉导航里面</a></li>
- </ul>
- <ul class="newsList">
- <li><a href="http://www.freejs.net/article_biaodan_59.html">星级选择器 提交代码</a></li>
- </ul>
- <ul class="newsList">
- <li><a href="http://www.freejs.net/article_jiaodiantu_53.html">jquery左右滚动焦点图banner图片,鼠标经过显示上下页</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
JavaScript Code
- <script type="text/javascript">
- $(function (){
- /* 淡隐淡现选项卡 */
- $(".row2 .JQ-slide").Slide({
- autoPlay:false,
- effect:"fade",
- speed:"normal",
- timer:30000
- });
- });
- </script>
CSS Code
- .row2{border:1px solid #E1E1E1;position:relative;width:300px;}
- .row2 .JQ-slide{background:url(images/side_bg1.jpg) no-repeat center top;}
- .row2 .JQ-slide-nav{float:none;overflow:hidden;zoom:1;padding:15px;}
- .row2 .JQ-slide-nav li{float:left;display:inline;background:url(images/slide_navbg.gif) no-repeat -70px 0;width:69px;height:23px;text-align:center;color:6b6b6b;font-weight:bold;text-align:center;line-height:22px;cursor:pointer;margin-right:5px;}
- .row2 .JQ-slide-nav li.on{background-position:0 0;color:white;}
- .row2 .JQ-slide-nav li.on a:link, .row2 .JQ-slide-nav li.on a:visited, .row2 .JQ-slide-nav li.on a:hover, .row2 .JQ-slide-nav li.on a:active{color:white;}
- .row2 .JQ-slide-content{position:relative;overflow:hidden;width:300px;height:120px;}
- .row2 .JQ-slide-content .newsList{position:absolute;top:0;left:0;background:white;}
原文地址:http://www.freejs.net/article_tabbiaoqian_61.html