Html
    Css
    Js

    
                        
 * {
	margin:0;
	padding:0;
	list-style:none;
}
#wrap {
	width:600px;
	margin:100px auto 0;
	overflow:hidden;
}
#tit {
	height:30px;
	width:600px;
}
#tit span {
	float:left;
	height:30px;
	line-height:30px;
	width:200px;
	font-size:20px;
	text-align:center;
	color:#ccc;
	background:green;
}
#con li {
	display:none;
	height:200px;
	width:600px;
	background:pink;
	font-size:100px;
	line-height:200px;
	text-align:center;
}
#tit span.select {
	background:red;
	color:#ccc;
}
#con li.show {
	display:block;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

基于jquery的tab切换

0