wait until images in background (css) are loaded

后端 未结 5 1114
自闭症患者
自闭症患者 2021-01-02 07:29

Let\'s say we have a slideshow of pictures. the thumbnails of those pictures are showed in div wrapper with a slider (that I created with Jquery) and each image is included

5条回答
  •  隐瞒了意图╮
    2021-01-02 07:41

    well, i think that maybe you are making things too complicated. I'm not really sure why you're using css background when the images could be inside a tag. You say the reason is because your images are dynamically created... and i dont understand that.

    What you could do is create a page that returns the images, maybe you could use some parameter... something like the image size:

    http://www.mysite.com/create_image.php?size=200x100&id=img1
    

    then all you need to do is put this url inside the SRC of the img tag... If you want to, you could pre-load the image when the page is loaded..or when your slider is moving

    Or maybe i didn't understood your problem =D

提交回复
热议问题