当前位置:首页 >> 网页制作

写html时,经常用到tab结构

html结构:

复制代码代码如下:
<div class="tab tab_survey">
<div class="tab_hd clearfix"><a class="curr" href="#">单题目调查</a><a href="#">多题目调查</a></div>
<div class="tab_bd">
<div class="tab_cont curr">
<ul class="list_survey_content">
<li>测试</li>
<li>测试</li>
<li>测试</li>
</ul>
</div>
<div class="tab_cont"></div>
</div>
</div>

CSS:
[code]
.tab_hd{ border-left:1px solid #ccc; margin-bottom:-1px; line-height:25px; }
.tab_hd a{ float:left; width:100px; height:24px; color:#1E50A2; border-top:1px solid #ccc; border-right:1px solid #ccc; text-align:center;}
.tab_hd .curr{ font-weight:bold;height:25px; background-color:#fff; position:relative;}
.tab_bd{ border:1px solid #ccc; padding:10px; border-bottom-left-radius:5px; border-bottom-right-radius:5px;}
.tab_cont{ display:none;}
.tab .tab_bd .curr{ display:block;}
[html]