Grow your CSS skills. Land your dream job.

image covering iFrame till clicked

  • # December 10, 2012 at 2:48 pm

    I would like to have an image covering an iframe until the image is clicked.

    I would like the image to fadeout, or just disappear, then the iframe appear.

    How would I go about doing this? Some sort of onClick function?

    # December 10, 2012 at 3:30 pm

    Is this going to be the same image all the time?

    Does the image serve any function other than to hide the iframe?

    # December 10, 2012 at 3:35 pm

    @Paulie_D everytime the page is reloaded it will be the same image. Its purpose is to hide the iFrame because the iFrame has an autoplay for the video that starts right when the page is loaded, and the image on top is to prevent this from happening.

    # December 10, 2012 at 3:45 pm

    …but won’t the video start playing regardless of whether the iframe is visible or not?

    This sounds like a ‘hacky’ solution to something that should be fixed at source.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".