Html
    Css
    Js

    
                        
* {
	padding:0;
	margin:0;
	box-sizing:border-box;
}
ul,li {
	list-style:none;
}
input {
	border:1px solid #f00;
}
.tabsbox {
	width:700px;
	height:200px;
	margin:0px auto;
	border:1px solid #ccc;
}
.navtab {
	border-bottom:1px solid #ccc;
	height:41px;
}
.tabsbox ul {
	width:680px;
	height:40px;
	line-height:40px;
	display:block;
	float:left;
}
.tabsbox ul li {
	float:left;
	padding:0px 28px;
	border:1px solid #ccc;
	border-left:0;
	border-top:0;
	position:relative;
}
.icon-guanbi {
	}.icon-guanbi::before {
	content:'x';
	position:absolute;
	right:0;
	top:0;
	width:15px;
	height:15px;
	line-height:12px;
	background-color:#000;
	text-align:center;
	color:#FFFFFF;
	font-size:0.75rem;
}
.tabscon {
	width:500px;
	height:460px;
	padding:20px;
	box-sizing:border-box;
}
.tabscon section {
	display:none;
}
.active {
	border-bottom:1px solid #FFFFFF !important;
}
.conactive {
	display:block !important;
}

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

js简单实用Tab切换

更新时间:2021-03-03 00:14:37

0