<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.box{
width: 400px;
height: 200px;
border: 1px solid red;
float: left;
margin-left: 15px;
display: none;
}
.box.on{
display:block;
}
a{
padding: 10px;
margin-left: 10px;
width: 30px;
display: block;
height: 10px;
border: 1px solid darkcyan;
float: left;
}
</style>
</head>
<body>
<a href="" class="on">1</a>
<a href="">2</a>
<a href="">3</a>
<div class="box on">1</div>
<div class="box">2</div>
<div class="box">3</div>
</body>
<script src="../js/jquery-3.4.1.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$('a').mouseenter(function(){
var index= $(this).index()
$(this).addClass('on').siblings().removeClass('on');
$('.box').eq(index).addClass('on').siblings().removeClass('on');
})
</script>
</html>
界面不重要,功能实现就好。