[英]Get image height and then show
我想加載圖像,確定高度,然后顯示它
這是我的代碼:
$("#block").animate({
height: HERE GOES HEIGHT + 50px for additional space
},
function() {
$("img").fadeIn("slow");
});
這會有用嗎?
$("img").load(function(){
var imgHeight = $(this).height();
});
$("#block").animate({
height: '+='imgHeight
},
function() {
$("img").fadeIn("slow");
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.