To the person with www.sparkzweb.com website

by man5
2 replies
  • WEB DESIGN
  • |
Can you tell me how you did the city background with css? I noticed that no matter how much i zoom out, that image stays fixed in same spot. How did you do it?

Thanks.
#person #website #wwwsparkzwebcom
  • Profile picture of the author greg80221
    using inspect element in chrome or firebug in firefox

    background-image: url("../img/img-1.jpg");

    nothing really special that I can tell on that but they do have a javascript library set up that might be the culprit and the cause of the slow load

    <script src="js/jquery.backgroundvideo.min.js"></script>

    looks to take the background and make it into a video which I think would force the aspect ratio to remain the same as it is hard coded in the jquery.
    {{ DiscussionBoard.errors[8849357].message }}
  • Profile picture of the author SteveJohnson
    It's done with the "background-size: cover" CSS attribute, in line 607 of the stylesheet (it's a 'shorthand' background style, but that's what 'cover' means in the style).
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[8852588].message }}

Trending Topics