您的位置:首页 > Web前端 > JavaScript

js 多层叠的TAB选项卡

2018-10-12 13:54 1046 查看
HTML:多个导航tag加一个放置默认内容div
脚本:以数组的形式给出每个导航对应的html
多层叠TAB选项卡

.nonstop { width:168px; font-size:12px;margin:auto; border:1px solid #cdcdcd; padding:2px; overflow:hidden; }
.nonstop span { float:left;_display:inline; cursor:pointer; width:22px; height:14px; background:#cdcdcd url(./img/button.gif) no-repeat -175px top; font-size:10px; line-height:14px; margin:2px 0 0 2px; display:inline; text-align:center; }
.nonstop span:hover { background:gray; font-weight:bold }
.nonstop div { height:300px; clear:both; border:1px solid #cdcdcd; border-width:2px 1px; margin-left:2px; overflow:hidden; }
.nonstop div a { float:left; width:80px; height:40px; background:white; text-align:center; line-height:40px; padding-top:8px; margin:1px 0 0 1px; }
.nonstop div a img { border:0; }
.nonstop span.hot { border:1px solid red; width:20px; color:white; height:15px; background:red url(./img/button.gif) no-repeat -175px -14px; font-weight:bold; border-bottom:none; }

一个多层叠的TAB选项卡,自适应宽度(自行更改nonstop的width测试效果)。
HTML:多个导航tag加一个放置默认内容div
脚本:以数组的形式给出每个导航对应的html

ABCDEFG
HI    JMLNO
PSTUYZ!

这里放一些默认内容
11111111

您可能感兴趣的文章:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: