亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

導(dǎo)航下劃線跟隨

原創(chuàng) 2019-05-06 13:32:31 256
摘要:<!DOCTYPE html> <html> <head> <title>document</title> <meta charset="utf-8"/> <script type="text/javascript" src="jq
<!DOCTYPE html>
<html>
<head>
<title>document</title>
<meta charset="utf-8"/>
<script type="text/javascript" src="jquery.js"></script>
<style type="text/css">
*{padding:0;margin:0;}
ul {list-style: none;z-index:20;position:relative;font-size: 15px;}
li:last-child{border-width: 0}
li {border-right:1px solid #CCC;float:left;cursor:pointer;width:100px;height: 32px;text-align:center;line-height:32px;color: #fff;font-weight: bold;}
.menu{width:504px;position:relative;margin:20px auto;height:32px;;background: rgb(0, 111, 236);border-radius:3px;border:1px solid rgb(0, 111, 236); }
.block{z-index:10;width:100px;height:2px;background:#fff;position:absolute;top:0px;}
</style>
<script type="text/javascript">
$(function(){
$('li').hover(
function(){
$x=parseInt($(this).attr('name'))*101
$('.block').stop().animate({left:$x+'px'})
},
function(){
$('.block').stop().animate({left:'0px'})
}  
)
})
</script>
</head>
<body>
<div class="menu">
<ul>
<li name="0">首頁</li>
<li name="1">菜單1</li>
<li name="2">菜單2</li>
<li name="3">菜單3</li>
<li name="4">菜單4</li>
</ul>
<div class="block"></div>

</div>
</body>
</html>


批改老師:查無此人批改時間:2019-05-07 09:39:35
老師總結(jié):今天看到你做了不少作業(yè)。不錯,繼續(xù)加油。 每行js語句,最后增加;號。記住了。

發(fā)佈手記

熱門詞條