0
ページの読み込み後に親に合わせて(おそらく小さなアニメーションを使用して)ぼかしを施した後、サイズを変更したい画像があります。任意のヒント?イメージはjqueryでアニメーションのサイズ変更とブラーを行います
ありがとうございます!
L
ページの読み込み後に親に合わせて(おそらく小さなアニメーションを使用して)ぼかしを施した後、サイズを変更したい画像があります。任意のヒント?イメージはjqueryでアニメーションのサイズ変更とブラーを行います
ありがとうございます!
L
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
と親要素を残していることです。
これは素晴らしい作品です。フェードアウトを.fadeTo( 'slow'、0.3)に変更するだけでした。どうもありがとうございました!!! –