如何用css+xhtml实现象windows选项卡一样的效果
时间:2005-05-23
来源:互联网
昨天试过几次,没有成功,有没有简单些的,看到yahoo上有类似的,但是很烦。
大家帮帮我,谢谢
大家帮帮我,谢谢
作者: lycey 发布时间: 2005-05-23
http://tech.tom.com/1380/1384/2004212-81045.html
作者: ifan 发布时间: 2005-05-23
楼上的,谢谢,不过你给的只是我要的一部分,我想要的是类似windows选项卡的效果,但是希望是用标准做的
作者: lycey 发布时间: 2005-05-23
<html> <head> <title>window</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type=text/css> td { font-size: 12px; font-family:arial; color: #000000; line-height: 150%; } .sec1 { background-color: #EEEEEE; cursor: hand; color: #000000; border-left: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-right: 1px solid gray; border-bottom: 1px solid #FFFFFF } .sec2 { background-color: #E4EAF8; cursor: hand; color: #000000; border-left: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-right: 1px solid gray; font-weight: bold; } .main_tab { background-color: #E4EAF8; color: #000000; border-left:1px solid #FFFFFF; border-right: 1px solid gray; border-bottom: 1px solid gray; } </style> <script language=javascript> <!-- function secBoard(n) { for(i=0; i<secTable.cells.length; i++){ secTable.cells[i].className="sec1"; } secTable.cells[n].className="sec2"; for(i=0; i<mainTable.tBodies.length; i++){ mainTable.tBodies[i].style.display="none"; } mainTable.tBodies[n].style.display="block"; } //--> </script> </head> <body> <table border=0 cellspacing=0 cellpadding=0 width=549 id=secTable> <tr height=20 align=center> <td class=sec2 width=10% onclick="secBoard(0)">General Information</td> <td class=sec1 width=10% onclick="secBoard(1)">Team</td> <td class=sec1 width=10% onclick="secBoard(2)">Documentation</td> <td class=sec1 width=10% onclick="secBoard(3)">Test Report</td> </tr> </table> <table border=0 cellspacing=0 cellpadding=0 width=549 height=240 id=mainTable class=main_tab> <tbody style="display:block;"> <tr> <td align=center valign=top> <br> <br> text </td> </tr> </tbody> <tbody style="display:none;"> <tr> <td align=center valign=top> <br> <br> text1 </td> </tr> </tbody> <tbody style="display:none;"> <tr> <td align=center valign=top> <br><br> text2 </td> </tr> </tbody> <tbody style="display:none;"> <tr> <td align=center valign=top> <br><br> text3 </td> </tr> </tbody> </table> </body> </html>
提示:您可以先修改部分代码再运行
作者: xxl 发布时间: 2005-06-22
不错不错!!
回去试试
回去试试
作者: 阿Ben无忌 发布时间: 2005-06-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28