!doctype html html head meta charset="utf-8" title制作Tab面板/t
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>制作Tab面板</title>
</head>
<style type="text/css">
#tab{
margin: 0; list-style: none;
padding: 0 0 31px;
border-bottom: 1px solid #11a3ff;
}
li{
float: left;
background: #BBDDFF;
margin-right: 4px; padding: 5px;
border: 1px solid #11a3ff; height: 20px;
}
.cur{
background-color: #fee;
border-bottom: 1px solid #fee; color: red;
}
div{
clear: left; padding: 10px;
height: 100px; background-color: #Fee;
border: 1px solid #11a3ff;
border-top: none; display: none;
}
.divcur{display: block;}
</style>
<body><script src="http://www.mamicode.com/jquery-3.4.1.min.js"></script>
<script>
$(function(){
$("#tab li").each(function(index){
$(this).mou搜索引擎优化ver(function(){
$("div.divcur").removeClass("divcur");
$("li.cur").removeClass("cur");
$("div:eq("+index+")").addClass("divcur");
$("li").eq(index).addClass("cur");
});
});
});
</script>
<ul>
<li>课程特色</li>
<li>教学要领</li>
<li>教学效果</li>
</ul>
<div>本课程主要特色</div>
<div>教学要领和教学手段</div>
<div>教学效果</div>
</body>
</html>
ASP动态网页设计与Ajax技术----制作Tab面板
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/33161.html