本文主要为大家带来一篇使用jquery实现简单的tab框实例。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧,希望能帮助到大家更好的使用jquery实现简单的tab框。
html代码
实现简单的tab框
- 休闲装
- 名媛
- 运动服
- 女装 男装 童装
- 甜美风 文艺风
- 运动男 运动女
css代码
* {
margin: 0;
padding: 0px;
}
ul {
width: 300px;
margin: 10px auto;
}
ul li {
list-style: none;
}
.main li {
text-align: center;
float: left;
padding: 5px;
margin-left: 10px;
width: 80px;
cursor: pointer;
background-color: #f3f2e7;
}
.main .style1 {
width: 50px;
font-weight: bold;
background-color: #f3f2e7;
border: 1px solid #837979;
border-bottom: 0;
z-index: 100;
position: relative;
}
.sublevel {
width: 260px;
height: 80px;
padding: 19px;
background-color: #f3f2e7;
clear: left;
border: 1px solid #837979;
position:relative;
top: -1px;
}
.sublevel li{
display: none;
}
.sublevel .style1{
display: block;
}jquery代码
$(function () {
//页面打开时 呈现的效果
$(".sublevel li:eq(0)").show();
//each遍历输出
$(".main li").each(function(index) {
//click 点击
$(this).click(function() {
//addClass()增加当前样式 removeClass()移除除当前点击之外的同级样式
$(this).addClass("main style1").siblings().removeClass("style1");
$(".sublevel li:eq("+index+")").show().siblings().hide();
})
})
})相关推荐:
SOAP、WSDL(WebServicesDescriptionLanguage)、UDDI(UniversalDescriptionDiscovery andIntegration)之一, soap用来描述传递信息的格式, WSDL 用来描述如何访问具体的接口, uddi用来管理,分发,查询webService 。具体实现可以搜索 Web Services简单实例 ; SOAP 可以和现存的许多因特网协议和格式结合使用,包括超文本传输协议(HTTP),简单邮件传输协议(SMTP),多用途网际邮件扩充协议









