Results 1 to 7 of 7

Thread: [RESOLVED] Preload image with CSS....

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Resolved [RESOLVED] Preload image with CSS....

    I found this:

    Code:
    <style type="text/css">
    .hiddenPic {display: none;}
    </style>
    
    <body>
    <Img src="images/home_logo.jpg" class="hiddenPic">
    </body>
    as a way to preload images for the next page.. but it doesnt seem to work.
    is there an easy way to do this?? (without javascript)
    reason being, there is a fade transition from index to home page.. I would like to preload the images so you dont see them "popping" in as it transitions.

    thanks!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Preload image with CSS....

    It's not possible to use CSS alone to preload images. You have to use some HTML mechanism (<object declare> should work, but doesn't in most browsers) or JavaScript.

    Does the fading effect (an IE-specific filter effect, if I'm not mistaken) even work when JS is disabled?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Preload image with CSS....

    Ok, so JS it is for the pre-load...

    yes fade is an IE specific effect... I dont know if its dependent on JS being enabled?
    Code:
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=3)">
    might be... its not a big deal if it doesnt work... just looks "nice"
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Preload image with CSS....

    wait.. forgot to ask for the preload code!

    would u mind posting it for javascript? thanks!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Preload image with CSS....

    fine.. you might as well just call me LAZY!! thanks!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [RESOLVED] Preload image with CSS....

    Fade is a proprietary extension, not dependant on Javascript, and IMO an abuse of HTTP headers.

Posting Permissions

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



Click Here to Expand Forum to Full Width