If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2013
    Member #

    Question Background Image Animation with CSS3

    Hello all,

    I'm building my first site and have run into a riddle I hope someone can help with. Basically I would like to create a site whose homepage has a background image like the wikipedia link (right here below) that resizes to every unique viewer's screen.

    I found the CSS3 coding for to resize a background image:
    html {
    background: url(images/bg.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;

    But the problem I'm running into is that I'd like to have the user (or the screen's viewfinder) venture out of the cave after they click on one of the Nav links. Would it be possible to divvy up the background into four foreground and background layers, and then "zoom" into the background to a larger view of outside the cave, revealing portions on the furthermost layer that are blocked by the foreground, and even have portions of the background that may bleed off the screen when each unique user hits the homepage? And if so, how?

    Any help would be really appreciated. I think it'd be a neat trick for a whole bunch of possible scenarios.



  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    731 times
    Just letting OP know that someone has seen this thread. I don't know how to answer it. Not sure about such things ... maybe it's like a "sprite"?

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Oklahoma City
    Member #
    959 times
    I'm not certain I understand what you're asking. Are you wanting to just zoom in on click? Using jQuery, you could just do like:
      $(this).animate({background-size: "150%",500});
    The numbers, of course are just examples. If you need to change the background image position, add that in there too.
    Without a better description of what you're trying to do, I'm not sure.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Not from USA
    Member #
    2784 times
    I don't get the thread either. More clarity is in order.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Join Date
    Aug 2013
    Venice, Florida
    Member #
    No doubt this is rather confusing IMO!

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 03:22 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: