中文(简体)
一个不错的适合作分类的选项卡效果代码
<style type="text/css"> body { margin:0px;文本对齐:居中;字体大小:12px; } #divall { 边距:自动;顶部边距:35px;宽度:300px;高度:200px;背景颜色:#7DA7D9;边框:0px; } #title { 宽度:300px;高度:20px;字体大小:14px;顶部边距:4px; } #table1 表 { width:300px;高度:30px;字体大小:12px; } #table2 表 { width:300px;高度:30px;字体大小:12px; } #content1,#content2,#content3,#content4,#content5,#content6,#msg1,#msg2 { 边距: 自动;高度:110px;宽度:290px;背景颜色:#eee;职位:亲属; } #content1 div,#content2 div,#content3 div,#content4 div,#content5 div,#content6 div { 位置:绝对;底部:3px;右:3px;光标:指针; } a { 文本装饰:无; } .changebordercolor { 顶部边框:1px 实心 #369;左边框:1px 实线#369; } .backbordercolor { 边框:0px 纯红色; } </style> <script language="javascript"> function msg(){ document.getElementById("msg1").style.display="none" document.getElementById("msg2").style.display="none" } function msgnone(ms,cont){ document.getElementById(ms).style.display='block' document.getElementById(cont).style.display='none' } function aa1(){ document.getElementById("content1" ).style.display="block" document.getElementById("content2").style.display="none" document.getElementById("content3").style.display="none" document.getElementById("content4"). style.display="none" document.getElementById("content5").style.display="none" document.getElementById("content6").style.display="none" } function aa2(){ document.getElementById(" content1").style.display="none" document.getElementById("content2").style.display="block" document.getElementById("content3").style.display="none" document.getElementById("content4" ).style.display="none" document.getElementById("content5").style.display="none" document.getElementById("content6").style.display="none" } function aa3(){ document.getElementById ("content1").style.display="none" document.getElementById("content2").style.display="none" document.getElementById("content3").style.display="block" document.getElementById(" content4").style.display="none" document.getElementById("content5").style.display="none" document.getElementById("content6").style.display="none" } function aa4(){ document .getElementById("content1").style.display="none" document.getElementById("content2").style.display="none" document.getElementById("content3").style.display="none" document.getElementById ("content4").style.display="block" document.getElementById("content5").style.display="none" document.getElementById("content6").style.display="none" } 函数 aa5() { document.getElementById("content1").style.display="none" document.getElementById("content2").style.display="none" document.getElementById("content3").style.display="none" 文档.getElementById("content4").style.display="none" document.getElementById("content5").style.display="block" document.getElementById("content6").style.display="none" } 函数 aa6 (){ document.getElementById("content1").style.display="none" document.getElementById("content2").style.display="none" document.getElementById("content3").style.display="none " document.getElementById("content4").style.display="none" document.getElementById("content5").style.display="none" document.getElementById("content6").style.display="block" } </script> <body onLoad="aa1();msg()"> <div id="divall"> <div id="title">分类类型</div> <div id="table1"> <table cellpadding=0 cellspacing=0 boder=0> <tralign=center> <td onMouseOver="this.bgColor='#33ccff';aa1();msg();this.className='changebordercolor'" onMouseOut="this .bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http://www.baidu.com">游戏下载</a></td> <td onMouseOver="this. bgColor='#33ccff';aa2();msg();this.className='changebordercolor'" onMouseOut="this.bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http ://www.baidu.com">游戏下载</a></td> <td onMouseOver="this.bgColor='#33ccff';aa3();msg();this.className='changebordercolor'" onMouseOut="this.bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http://www.baidu.com">游戏下载</a></td> </tr ></table></div> <div id="content1">第一个里面的内容<div onClick="msgnone('msg1','content1')">关闭</div></div> < div id="content2">第二个里面的内容<div onClick="msgnone('msg1','content2')">关闭</div></div> <div id="content3">第三个里面的内容<div onClick="msgnone('msg1','content3')">关闭</div></div> <div id="msg1">没有选择类型</div> <div id="table2 "> <table cellpadding=0 cellspacing=0 boder=0> <tralign=center> <td onMouseOver="this.bgColor='#33ccff';aa4();msg();this.className='changebordercolor'" onMouseOut="this.bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http://www.baidu.com">游戏下载</a></td> <td onMouseOver ="this.bgColor='#33ccff';aa5();msg();this.className='changebordercolor'" onMouseOut="this.bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http://www.baidu.com">游戏下载</a></td> <td onMouseOver="this.bgColor='#33ccff';aa6();msg();this.className= 'changebordercolor'" onMouseOut="this.bgColor='#7DA7D9';this.className='backbordercolor'"><a href="http://www.baidu.com">游戏下载</a></td > </tr></table></div> <div id="content4">第四个里面的内容<div onClick="msgnone('msg3','content4')">关闭</div>< /div> <div id="content5">第五个里面的内容<div onClick="msgnone('msg2','content5')">关闭</div></div> <div id="content6" >第六个里面的内容<div onClick="msgnone('msg2','content6')">关闭</div></div> <div id="msg2">没有选择类型</div> </ div></body>