標題:清單中背景出現動畫 jQuery Background Position
出處:A.PAO designSTUDIO BLOG
時間:Wed, 01 Feb 2012 11:44:35 +0000
作者:apao
地址:https://blog.apao.idv.tw/post/868/
內容:
點擊在新視窗中瀏覽此圖片
https://blog.apao.idv.tw/attachment.php?fid=1372
html中放置
- Home
- About
- Contact
備註:詳細可參考demo中CSS ID+Script的作法,可分好幾種動畫。
$('#a a')
.css( {backgroundPosition: "-20px 35px"} )
.mouseover(function(){
$(this).stop().animate({backgroundPosition:"(-20px 94px)"}, {duration:500})
})
.mouseout(function(){
$(this).stop().animate({backgroundPosition:"(40px 35px)"}, {duration:200, complete:function(){
$(this).css({backgroundPosition: "-20px 35px"})
}})
})
出處:
http://snook.ca/technical/jquery-bg/
參考:
http://www.skuare.net/test/jBgpos.html
demo:
http://apao.zapto.org/~apao/jQuery/Background_Position/
Generated by Bo-blog 2.1.1 Release