Forums

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

Home Forums CSS [Solved] backface-visibility just loading image on refresh

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #186039
    kringeltorte
    Participant

    Hello!
    I am trying to implement an effect, in which a picture disappears on scroll, using backface-visibility: hidden;. It seems like there is a bug which prevents the picture from loading, as long as it is not cached. On refresh it works fine, just the initial load does not show the picture.
    The relevant css looks like this:

    `
    .bg-img {
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    }

    .bg-img img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    min-width: 100%;
    min-height: 100%;
    }
    `

    Is there any way to get the same effect without backface-visibility? Or is there a fix for the bug?

    Thank you so much for your help in advance!!

    #186052
    Senff
    Participant

    Can you show an example where you’ve implemented this and where it’s not working? Or create a pen on http://codepen.io so we can see what you mean exactly?

    #186053
    kringeltorte
    Participant

    Thank you for your reply! I figured out what I did wrong. Backface-visibility was not to blame!

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