jquery实现淡入淡出tab选项卡切换特效

1个月前 (04-16 11:07)阅读30回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4714
  • 级别管理员
  • 主题942
  • 回复2
楼主

jquery实现tab选项卡淡入淡出渐隐切换显示特效,运行代码后点击选项卡切换时看到该特效,根据自己的需求来自定义。

<!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=gb2312" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>jquery实现淡入淡出tab选项卡切换特效_武鸣人</title>
<style type="text/css">
ul,li{margin:0;padding:0;list-style:none;}
#tab_wuming li{float:left;background-color:#868686;color:white;padding:5px;margin-right:2px;border:1px solid white;}
#tab_wuming li.wuming{background-color:#6E6E6E;border:1px solid #6E6E6E;}
.content_wuming{clear:left;background-color:#6E6E6E;color:white;width:300px;height:100px;padding:10px;display:none;}
.wuming_ren{display:block;}
</style>
<script type="text/javascript" src="/img/jquery_wuming_ren.js"></script>
<script type="text/javascript">
 $(function(){
 var _tab=$('ul#tab_wuming>li');
var _con=$('div#tab_box_wuming>div');
var _conthis;
var _index=0;
_tab.click(function(){
_index=_tab.index(this);
$(this).addClass('wuming').siblings().removeClass('wuming');
_con.filter(':visible').stop(true,true).fadeOut(200,function(){
_con.eq(_index).fadeIn(200)
})
});
})//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
需要加载js文件,请刷新页面后看效果!
<ul id="tab_wuming">
<li class="wuming">武鸣人1号</li>
<li>武鸣人2号</li>
<li>武鸣人3号</li>
</ul>
<div id="tab_box_wuming">
<div class="wuming_ren content_wuming">一号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</div>
<div class="content_wuming">二号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</div>
<div class="content_wuming">三号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</div>
</div>
</body>
</html>


0
0
收藏0
回帖

jquery实现淡入淡出tab选项卡切换特效 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息