abstract:<!DOCTYPE html><html><head charset='utf-8'> <title>下滑跟隨導(dǎo)航</title> <script type="text/javascript" src="css/jquery-3.4.1.min.js"></scri
<!DOCTYPE html>
<html>
<head charset='utf-8'>
<title>下滑跟隨導(dǎo)航</title>
<script type="text/javascript" src="css/jquery-3.4.1.min.js"></script>
<style type="text/css">
*{padding: 0;margin: 0;}
ul{list-style: none;z-index: 20;position: relative;font-size: 15px;}
li{float: left;cursor: pointer;width: 100px;height: 30px;text-align: center;line-height: 30px;color: #fff;font-weight: bold;}
.menu{width: 1080px;position: relative;margin: 20px auto;height: 32px;box-shadow: 2 2px #000;background: #AF3434;border-radius: 3px;}
</style>
<script type="text/javascript">
$(function () {
$('li').hover(function(){
$x=parseInt($(this).attr('name'))*100
$('.block').stop().animate({left:$x+'px'},300)},
function(){
$('.block').stop().animate({left:'0px'},300)
}
)
})
</script>
</head>
<body>
<div class="menu">
<ul>
<li name="0">首頁(yè)</li>
<li name="1">php中文網(wǎng)</li>
<li name="2">獨(dú)孤九劍</li>
<li name="3">西門(mén)大官人</li>
<li name="4">滅絕師太</li>
<li name="5">html視頻</li>
<li name="6">php視頻</li>
</ul>
<div class="block" style="z-index: 10;width: 100px;height: 2px;background:#fff;position: absolute;top: 30px;"></div>
</div>
</body>
</html>
Correcting teacher:查無(wú)此人Correction time:2019-06-26 14:54:02
Teacher's summary:完成的不錯(cuò)。每行js和jq語(yǔ)句結(jié)束增加;號(hào)。繼續(xù)加油
批改了你四個(gè)作業(yè),下次一定要把結(jié)束符加上。