abstract:<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<style type="text/css">
.contnent{
width: 500px;
box-shadow: aquamarine 1px;
height: 50px;
margin: 5% auto 0;
background: #7FFFD4;
position: relative;
}
.contnent .li{
width: 100px;
height: 50px;
float: left;
text-align: center;
line-height: 50px;
font-size: 14px;
color: white;
}
.contnent .li:hover{
background: cornflowerblue;
}
</style>
<script>
$(function(){
$('.li').hover(function(){
$x=$(this).index();
$x=$x*100;
$('.block').stop().animate({left:$x+'px'},300)
},function(){
$('.block').stop().animate({left:'0px'},300)
})
})
</script>
</head>
<body>
<div class="contnent">
<div class="li">小米商城</div>
<div class="li">小爱同学</div>
<div class="li">小米note88</div>
<div class="li">小米666</div>
<div class="li">小米8848</div>
<div class="block" style="width: 100px;height: 3px;background: white;z-index: 3; position: absolute; left: 0px;bottom: 0px;"></div>
</div>
</body>
</html>
Correcting teacher:查无此人Correction time:2019-03-27 09:09:38
Teacher's summary:完成的不错,下次把代码缩进,看着整齐,继续加油。