Results 1 to 5 of 5

Thread: Can I add a preloader to Background Image Carousel v1.1?

  1. #1
    Join Date
    Oct 2010
    Posts
    29
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Can I add a preloader to Background Image Carousel v1.1?

    1) Script Title: Background Image Carousel v1.1

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...bgcarousel.htm

    3) Can I add an image pre-loader to Background Image Carousel v1.1? If so, where do I put it in the script and what would it be? Would I just put "preload_images: 1;" somewhere to preload the images? If so, where should I put that?

    Thanks! :-)

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    You can preload images very easily in modern web browsers (IE9+) by placing multiple background images on a pseudo element;
    Code:
    body:after {
          display: none;
          content: url(path/to/image1.jpg) url(path/to/image2.jpg) url(path/to/image3.jpg);
    }
    No extra markup or javascript required - just CSS.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Oct 2010
    Posts
    29
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that info. Where do I put the code:

    body:after {
    display: none;
    content: url(path/to/image1.jpg) url(path/to/image2.jpg) url(path/to/image3.jpg);
    }

    I just tried inserting that exact thing, (though changing the paths to my images), in both the <head> and <body> sections and both showed the code on the page instead of doing anything.

    I'm sorry, but I really need to know exactly where to put this! Thanks! :-)

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    It is CSS so put it in your stylesheet.

    If you need further help, please provide a link to your page/website.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    CookieMonster (03-04-2015)

  6. #5
    Join Date
    Oct 2010
    Posts
    29
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    THANK YOU! I do not know why I did not see you state it was a "css script" in the first place. Thanks much! :-)

Similar Threads

  1. Background Image Randomizer and Preloader
    By KennyP in forum JavaScript
    Replies: 11
    Last Post: 06-19-2014, 07:47 PM
  2. Replies: 3
    Last Post: 12-30-2012, 03:58 PM
  3. Background Image Carousel won't load stuck on black background
    By accessotronik in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 10-15-2012, 02:23 PM
  4. Background Image Carousel
    By WillyBear in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-26-2012, 07:44 PM
  5. Background Image Carousel background-size: cover; is not working
    By kerriluo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-12-2012, 10:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •