Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0
}
li {
	list-style:none
}
.clear {
	clear:both
}
.menus {
	width:750px;
	margin:40px auto
}
.menus ul {
	width:750px;
	border-bottom:2px solid #009fe9;
	position:relative;
	float:left
}
.menus li {
	float:left;
	width:150px;
	height:40px;
	line-height:40px;
	text-align:center;
	cursor:pointer;
	-webkit-transition:all .5s;
	-moz-transition:all .5s;
	-ms-transition:all .5s;
	-o-transition:all .5s;
	transition:all .5s
}
.menus li:nth-child(2) {
	color:#fff
}
.menus .bg {
	width:150px;
	height:40px;
	position:absolute;
	left:0;
	top:0;
	background:#009fe9;
	z-index:-1;
	-webkit-transition:all .5s;
	-moz-transition:all .5s;
	-ms-transition:all .5s;
	-o-transition:all .5s;
	transition:all .5s
}
.tab {
	width:750px;
	height:500px;
	border:1px solid #000;
	margin-top:20px;
	font-size:40px;
	line-height:500px;
	text-align:center;
	color:#888;
	font-weight:700;
	display:none
}
.show {
	display:block
}
.title {
	text-align:center;
	padding:20px;
	background:#ccc
}

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

jQuery滑动选项卡

更新时间:2020-07-23 00:17:27

0