Forums

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

Home Forums CSS Webkit Transition – “fade-in” background-image on hover?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31859

    Should this be working? I want a fade transition to the hover image.

    #nav-main ul li.nav-portfolio a {
    background-image: url(images/nav-portfolio-base.jpg);
    width: 79px;
    -webkit-transition-property: background-image;
    -webkit-transition-duration: 1.0s;
    -webkit-transition-timing-function: ease-out;
    }

    #nav-main ul li.nav-portfolio a:hover {
    background-image: url(images/nav-portfolio-hover.jpg);
    width: 79px;
    }

    Any ideas?

    #57053
    jimsilverman
    Member

    it’s currently not possible to transition background images or css3 gradients (since they’re treated as background images).

    #56549

    bummer.

    #118629
    siniradam
    Member

    This should do the job.

    #mydiv {
    transition: background-image 1s ease-in-out;
    background-image:url(“/firstimg.jpg”);
    }

    #mydiv:hover {
    background-image:url(“/secondimg.jpg”);
    }

    #118652

    Thank you!

    #168804
    socialblogsite
    Participant

    It won’t work using multiple background images :(
    I just need my image overlayed with black 50%, so I need both background-images , but I need to fade the black to 0… the problem is I also can’t use pseudo-elements because they are already allocated :(

    I’m testing in Chrome 34.0.1847.116

    Anyone knows a workaround?

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