Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fixed background image within div

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #237614
    NoobSimon
    Participant

    Is is possible to move a div with a background image with the viewport until end of div.

    Eg if the div is 200% height of the viewport and the image is 100% height of the viewport . So it give the illusion as if the background image is moving with the viewport?

    #237621
    Paulie_D
    Member

    Didn’t you ask this before? – https://css-tricks.com/forums/topic/pausing-div-illusion/

    Please don’t re-post just because you didn’t get an answer.

    It sounds like you’re after some sort of parallax scrolling.

    #237623
    NoobSimon
    Participant

    Suppose so – I managed to get this far (below) however since I have to use position absolute with scrollmagic it wont push the elements below the fixed div
    http://codepen.io/simonfricker/pen/qbypBr

    #237624
    Shikkediel
    Participant

    I’ve looked at all four of the topics you started on this but unless you explain exactly what you’re after and create the basic markup that applies to your question, I don’t know how to help you out. Seems like a piece of cake and about 15 minutes of coding for the rest.

    #237625
    NoobSimon
    Participant

    Its hard to explain. but I will try….

    I have an image that needs to stay static while content scrolls over the top of it. However as soon as there is no more content to scroll over it, the flow of the document needs to continue to the next section. This means that the image needs to be pushed down with the viewport to keep it ‘static’ The end result should look like this:
    https://i.imgur.com/qeC0bcQ.gifv

    #237630
    Shikkediel
    Participant

    Here’s something…

    Link

    #237642
    NoobSimon
    Participant

    I cant thank you enough for this.

    #237653
    Shikkediel
    Participant

    Glad to lend a hand. :-)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.