如何显示加载图像,直到所有图像都加载到网页中。 [英] how to display loading image till all the images get loaded in the web page.

查看:121
本文介绍了如何显示加载图像,直到所有图像都加载到网页中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个由大约75张图片组成的网页。当页面加载时它只显示外框,显示所有图像需要很长时间,所以我想显示加载消息或图像,直到页面完全加载。



我试过

 $( window )。load( function (){
$( #pageloaddiv)。 fadeOut( 2000 );
});



但它仅适用于页面而不是对于图像。有没有办法显示加载消息,直到所有图像都被加载?

解决方案

window )。 load( function (){


#pageloaddiv)。fadeOut( 2000 );
});



但它仅适用于页面而不适用于图像。有没有办法显示加载消息,直到所有图像都被加载?


类似的查询在下面的链接回答:



http://stackoverflow.com/questions/4635388/how-to-display -loading-image-while-actual-image-is-downloads [ ^ ]



希望这会对你有所帮助。感谢。

I am designing a web page which consists of around 75 images. When the page gets loaded it shows only the outer box and it takes long time to display all images, so i want to display loading message or image till the page gets fully loaded.

I tried

$(window).load(function() {
    $("#pageloaddiv").fadeOut(2000);
});


But it works only for the page and not for the images. Is there any way to display loading message till all the images get loaded?

解决方案

(window).load(function() {


("#pageloaddiv").fadeOut(2000); });


But it works only for the page and not for the images. Is there any way to display loading message till all the images get loaded?


The similar kind of query is answered at below link:

http://stackoverflow.com/questions/4635388/how-to-display-loading-image-while-actual-image-is-downloading[^]

Hope this would help you. Thanks.


这篇关于如何显示加载图像,直到所有图像都加载到网页中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆