关于选项卡功能大家一定都不会陌生,无非就是鼠标点击或者悬浮能够切换相关的内容。
通常情况下,大家见到的选项卡都是没有嵌套功能的,也就是说就是完成了一层切换效果,本章节分享一段代码实例,实现了选项卡的嵌套功能,也就是选项卡中嵌套有选项卡功能,也就能够容纳更多的内容。
代码如下:
jquery选项卡 body, ul, li, div, a{ margin:0px; padding:0px; } body{ margin-top:10px; margin-left:15px; } #all{ border-left:1px solid #ccc; border-right:1px solid #ccc; border-bottom:1px solid #ccc; width:255px; } #title li{ float:left; list-style:none; width:50px; border-top:2px solid #f60; border-right:1px solid #ccc; text-align:center; padding-top:3px; } #title li:last-child{ border-right:1px solid #fff; } .new{ border-bottom:1px solid #fff; color:#f60; } .old{ border-bottom:1px solid #ccc; } #content{ clear:both; } #content ul{ margin-left:5px; list-style:none; float:left; } #content li{ width:40px; height:30px; background-color:#f60; text-align:center; color:#fff; } .inContent{ width:205px; height:90px; background-color:#f6c; margin-left:50px; }
- 要闻
- 国内
- 时尚
- 旅游
- 科技
A1 B1 C1
- 01
- 02
- 03
A2 B2 C2
- 01
- 02
- 03
A3 B3 C3
- 01
- 02
- 03
A4 B4 C4
- 01
- 02
- 03
A5 B5 C5
- 01
- 02
- 03


