三种不同风格tab选项卡切换特效分享

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

三种风格实用tab选项卡特效分享,有点击切换或鼠标经过切换两种方式,这个选项卡特效兼容当前主流浏览器。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN">
<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>三种不同风格tab选项卡切换特效分享_武鸣人</title>
<style type="text/css">
<!--
* { margin:0; padding:0; font-size:12px; font-weight:normal; }
.jj  { font-weight:bolder!important; }
.box { border-top-color:#c00!important; }
.pr { color:#060!important; }
ol{list-style:none}
#tab_wuming_1 { position:relative; width:336px; height:88px; padding-top:15px; margin:50px; overflow:hidden; }
#tab_wuming_1 h3 { position:relative; z-index:2; float:left; height:14px; padding:0 7px 0 8px; margin-left:-1px; border-left:solid 1px #ccc; border-right:solid 1px #fff; text-align:center; background:#fff; cursor:pointer; }
#tab_wuming_1 h3.up { height:18px; padding:5px 7px 0 7px; margin:-6px 0 0 0; border:solid #ccc; border-width:1px 1px 0; color:#c00; }
#tab_wuming_1 div { display:none; position:absolute; left:0; top:32px; z-index:1; width:324px; height:54px; padding:5px; border:solid 1px #ccc; color:#666; }
#tab_wuming_1 div.up { display:block; }
#tab_wuming_2 { position:relative; width:200px; margin:50px; border:solid #ccc; border-width:0 1px 1px; }
#tab_wuming_2 h4 { height:18px; line-height:18px; border:solid #ccc; border-width:1px 0; margin-bottom:-1px; text-align:center; background:#f6f6f6; cursor:pointer; }
#tab_wuming_2 h4.up { color:#c00; }
#tab_wuming_2 ol { display:none; height:54px; padding:5px; color:#666; }
#tab_wuming_2 ol.up { display:block; }
#tab_wuming_3 { position:relative; width:100px; margin:50px; }
#tab_wuming_3 h3 { position:relative; z-index:1; height:16px; padding-top:4px; margin-bottom:-1px; border:solid #ccc; border-width:1px 0 1px 1px; text-align:center; font-family:宋体; background:#eee; cursor:pointer; }
#tab_wuming_3 h3.up { z-index:3; color:#c00; background:#fff; }
#tab_wuming_3 div.tab { display:none; position:absolute; left:99px; top:0; z-index:2; width:300px; height:200px; padding:5px; border:solid 1px #ccc; color:#666; }
#tab_wuming_3 div.tab.up { display:block; }
-->
</style>
</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>
<div id="tab_wuming_1">
<h3>武鸣人一号</h3>
<div><p>一号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人二号</h3>
<div><p>二号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人三号</h3>
<div><p>三号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人四号</h3>
<div><p>四号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
</div>
<div id="tab_wuming_2">
<h4>武鸣人一号</h4>
<ol><li>一号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</li></ol>
<h4>武鸣人二号</h4>
<ol><li>二号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</li></ol>
<h4>武鸣人三号</h4>
<ol><li>三号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</li></ol>
<h4>武鸣人四号</h4>
<ol><li>四号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</li></ol>
</div>
<div id="tab_wuming_3">
<h3>武鸣人一号</h3>
<div><p>一号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人二号</h3>
<div class="tab wushi"><p>二号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人三号</h3>
<div><p>三号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
<h3>武鸣人四号</h3>
<div class="tab tab123"><p>四号选项卡内容,武鸣人。<br /><a href="https://www.wuming.ren" target="_blank">武鸣人</a>,各种信息免费发布,资源共享合作共赢!</p></div>
</div>
<script type="text/javascript">
<!--
function Pid(id,tag){
if(!tag){
return document.getElementById(id);
}
else{
return document.getElementById(id).getElementsByTagName(tag);
}
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function tab_wuming(id,hx,box,iClass,s,pr){
var hxs=Pid(id,hx);
var boxs=Pid(id,box);
if(!iClass){ // 如果不指定class,则:
boxsClass=boxs; // 直接使用box作为容器
}
else{ // 如果指定class,则:
var boxsClass = [];
for(i=0;i<boxs.length;i++){
if(boxs[i].className.match(/\btab\b/)){// 判断容器的class匹配
boxsClass.push(boxs[i]);
}
}
}
if(!pr){ // 如果不指定预展开容器,则:
go_to(0); // 默认展开序列
yy();
}
else {
go_to(pr);
yy();
}
function yy(){
for(var i=0;i<hxs.length;i++){
hxs[i].temp=i;
if(!s){// 如果不指定事件,则:
s="onmouseover"; // 使用默认事件
hxs[i][s]=function(){
go_to(this.temp);
}
}
else{
hxs[i][s]=function(){
go_to(this.temp);
}
}
}
}
function go_to(pr){
for(var i=0;i<hxs.length;i++){
if(!hxs[i].tmpClass){
hxs[i].tmpClass=hxs[i].className+=" ";
boxsClass[i].tmpClass=boxsClass[i].className+=" ";
}
if(pr==i){
hxs[i].className+=" up"; // 展开状态:标题
boxsClass[i].className+=" up"; // 展开状态:容器
}
else {
hxs[i].className=hxs[i].tmpClass;
boxsClass[i].className=boxsClass[i].tmpClass;
}
}
}
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
tab_wuming("tab_wuming_1","h3","div","","onclick",2); tab_wuming("tab_wuming_2","h4","ol");tab_wuming("tab_wuming_3","h3","div","tab"); 
//-->
</script>
</body>
</html>


0
0
收藏0
回帖

三种不同风格tab选项卡切换特效分享 期待您的回复!

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

取消确定

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