最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery實(shí)現(xiàn)菜單感應(yīng)鼠標(biāo)滑動動畫效果的方法

 更新時(shí)間:2015年02月28日 15:13:18   投稿:shichen2014  
這篇文章主要介紹了jQuery實(shí)現(xiàn)菜單感應(yīng)鼠標(biāo)滑動動畫效果的方法,實(shí)例分析了jQuery中鼠標(biāo)事件及animate的使用技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了jQuery實(shí)現(xiàn)菜單感應(yīng)鼠標(biāo)滑動動畫效果的方法。分享給大家供大家參考。具體分析如下:

此代碼測試環(huán)境為IE9 以及GG、FF瀏覽器,IE8及以下瀏覽器可能不支持,希望理解。

這款JS鼠標(biāo)滑動效果使用jQuery實(shí)現(xiàn)簡單動畫的方法,而且也驚喜的發(fā)現(xiàn),jquery有更好的書寫方法,可以連寫,在animate方法前加上stop方法就可實(shí)現(xiàn)鼠標(biāo)移出后,不再執(zhí)行滑動效果。

復(fù)制代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>非常不錯(cuò)的jQuery鼠標(biāo)滑動效果</title>
<script src="js/jquery.min.js" type="text/javascript"></script>
<style>
body{font-size:12px;font-family:Tahoma,Arial,Verdana;color:#fff; background:#000; width:100%; height:100%;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td ,i{padding:0;margin:0}
fieldset,img {border:0}
.clear{ clear:both;}
address,caption,cite,code,dfn,em,th,var {font-weight:normal;font-style:normal}
ol,ul {list-style:none}
caption,th {text-align:left}
h1,h2,h3,h4,h5,h6 {font-size:100%}
abbr,acronym,img {border:0}
button,input,select,textarea{font-size:100%;}
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}
table {border-collapse:collapse;border-spacing:0;}
a{text-decoration:none;}
a:hover {text-decoration:underline;}
.clearfix:after {visibility: hidden;display: block;font-size: 0;content: ".";clear:both;}
.all ul{ width:100%; text-align:center;}
.all ul li{ width:100%; height:40px; line-height:40px; border-bottom:1px dashed #990066; cursor:pointer;}
</style>
</head>
<body>
<div class="all">
<ul>
<li>第一項(xiàng)</li>
<li>第二項(xiàng)</li>
<li>第三項(xiàng)</li>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.all ul li').mouseover(function(){
$(this).animate({"height":"70px","line-height":"70px"},100)
}).mouseleave(function(){
$(this).stop().animate({"height":"40px","line-height":"40px"},100)
});
})
</script>
</body>
</html>

希望本文所述對大家的jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論

雅安市| 衡东县| 襄樊市| 黄平县| 西峡县| 伊吾县| 洞口县| 武汉市| 铁岭县| 和平县| 都兰县| 万年县| 郁南县| 莱西市| 陆丰市| 英山县| 西宁市| 镇宁| 左权县| 郑州市| 望谟县| 横山县| 东丽区| 阳原县| 苏尼特左旗| 施秉县| 肇州县| 琼结县| 阿城市| 襄樊市| 塘沽区| 米易县| 栾城县| 威信县| 宁远县| 延津县| 汤原县| 临漳县| 三原县| 河津市| 都昌县|