문제

I have the same background image on my whole web application(multi page not single page).Is it possible that background image stays loaded on internal link changes without using ajax?(I don't want to see a blank page between loading pages )

Thank you in advance.

도움이 되었습니까?

해결책

I guess pure theoretically there will be always be a gap between changing your backround while the parser loads new content into the container. Just the velocity of the engine prevents you to notice this. However... I also guess you know how to change your body backround-image in css as well. All in all your question isn't particulary precise like my redundant answer is.

Here's a proposition I use for (one of) my site(s) in jQuery:

image.fadeOut(300, function(){
if($(window).width()==1920){
image.css("background", "url('../your_pic_here.jpg')");
image.fadeIn(2200);
}

Just think away the fade-stuff and probably it helps your application.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top