ASP dynamic web design and manufacture of Ajax technology ---- Tab Panel

<!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="jquery-3.4.1.min.js"></script>
 <script>
 $(function(){
  $("#tab li").each(function(index){
   $(this).mouseover(function(){
    $("div.divcur").removeClass("divcur");
    $("li.cur").removeClass("cur");
    $("div:eq("+index+")").addClass("divcur");
    $("li").eq(index).addClass("cur");
   });
  });
 });
 </script>
 <ul id="tab">
 <li class="cur">课程特色</li>
  <li>Teaching methods </ li>  <div> teaching methods and teaching methods </ div> <div class = "divcur"> The main feature of this program </ div> </ ul>
  <li> teaching effectiveness </ li>



 <div> teaching effectiveness </ div>
</ body>
</ HTML>

Guess you like

Origin www.cnblogs.com/sihuan/p/12091568.html