js+css仿网页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>js+css仿网易tab选项卡特效_武鸣人</TITLE> <STYLE type=text/css> BODY { FONT-SIZE: 14px; } OL LI { MARGIN: 8px } #con { FONT-SIZE: 12px; MARGIN: 0px auto; WIDTH: 600px } #tags { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 10px; WIDTH: 400px; PADDING-TOP: 0px; HEIGHT: 23px } #tags LI { BACKGROUND: url(/img/20240420_www_wuming_ren_20.gif) no-repeat left bottom; FLOAT: left; MARGIN-RIGHT: 1px; LIST-STYLE-TYPE: none; HEIGHT: 23px } #tags LI A { PADDING-RIGHT: 10px; PADDING-LEFT: 10px; BACKGROUND: url(/img/20240420_www_wuming_ren_21.gif) no-repeat right bottom; FLOAT: left; PADDING-BOTTOM: 0px; COLOR: #999;LINE-HEIGHT: 23px; PADDING-TOP: 0px; HEIGHT: 23px; TEXT-DECORATION: none } #tags LI.emptyTag { BACKGROUND: none transparent scroll repeat 0% 0%; WIDTH: 4px } #tags LI.wuming_ren { BACKGROUND-POSITION: left top; MARGIN-BOTTOM: -2px; POSITION: relative; HEIGHT: 25px } #tags LI.wuming_ren A { BACKGROUND-POSITION: right top; COLOR: #000; LINE-HEIGHT: 25px; HEIGHT: 25px } #wwwwumingren { BORDER-RIGHT: #aecbd4 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: #aecbd4 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #aecbd4 1px solid;PADDING-TOP:1px; BORDER-BOTTOM: #aecbd4 1px solid; BACKGROUND-COLOR: #fff } .wwwwumingren { PADDING-RIGHT: 10px; DISPLAY: none; PADDING-LEFT: 10px; BACKGROUND: url(/img/20240420_www_wuming_ren_22.gif) repeat-x; PADDING-BOTTOM: 10px; WIDTH: 576px; COLOR: #474747; PADDING-TOP: 10px; HEIGHT: 250px } #wwwwumingren DIV.wuming_ren { 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=con> <UL id=tags> <LI><A onClick="select_wuming('wwwwumingren0',this)" href="javascript:void(0)">武鸣人一号</A> </LI> <LI class=wuming_ren><A onClick="select_wuming('wwwwumingren1',this)" href="javascript:void(0)">武鸣人二号</A> </LI> <LI><A onClick="select_wuming('wwwwumingren2',this)" href="javascript:void(0)">武鸣人三号</A> </LI></UL> <DIV id=wwwwumingren> <DIV class=wwwwumingren id=wwwwumingren0><a href="https://www.wuming.ren">武鸣人一号内容</a>,各种信息免费发布,资源共享合作共赢!</DIV> <DIV class="wwwwumingren wuming_ren" id=wwwwumingren1><a href="https://www.wuming.ren">武鸣人二号内容</a>,各种信息免费发布,资源共享合作共赢!</DIV> <DIV class=wwwwumingren id=wwwwumingren2><a href="https://www.wuming.ren">武鸣人三号内容</a>,各种信息免费发布,资源共享合作共赢!</DIV></DIV></DIV> <SCRIPT type=text/javascript> function select_wuming(showContent,selfObj){ // 标签 var tag = document.getElementById("tags").getElementsByTagName("li"); var taglength = tag.length; for(i=0; i<taglength; i++){ tag[i].className = ""; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) selfObj.parentNode.className = "wuming_ren"; // 标签内容 for(i=0; j=document.getElementById("wwwwumingren"+i); i++){ j.style.display = "none"; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) document.getElementById(showContent).style.display = "block"; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </SCRIPT> </BODY> </HTML>
本文来自武鸣人网站,转载请注明出处