2011-07-24 14 views

答えて

1
var img = $('.anImage'), 
    offset = img.offset(); 

// position image absolutely in the same position to allow it to expand 
img.css({ 
     position: "absolute", 
     top: offset.top, 
     left: offset.left, 
     zIndex: 100 
    }) 
    // animate expansion 
    .animate({ 
     top: 0, 
     left: 0, 
     width: img.parent().width(), 
     height: img.parent().height() 
    }, "fast") 
    // fadeout 
    .fadeOut("fast"); 

は唯一の要件は、あなたがposition: relativeと親要素を残していることです。

+0

これは素晴らしい作品です。フェードアウトを.fadeTo( 'slow'、0.3)に変更するだけでした。どうもありがとうございました!!! –

関連する問題