Treehouse: Grow your CSS skills. Land your dream job.

Background Transition?

  • # April 1, 2012 at 11:20 am

    Is it possible to add a CSS transition to a CSS gradient?

    I’ve been trying to do it, but having no luck.

    Fiddle here: //jsfiddle.net/andyunleashed/X4pLt/

    I’ve attempted to change it on the hover but it snaps in rather than transitioning and I’m stumped.

    Obviously this can probably be done with JS but I’d rather see if there’s a CSS alternative.

    # April 1, 2012 at 2:34 pm

    Possible workaround here.

    //lab.tylergaw.com/css-gradient-transition-sorta/

    # April 1, 2012 at 4:14 pm

    Is not possible, but the solution amoss proposes is quite good.
    Anyway, I saw you made a little mistake.

    You write in your CSS

    # April 1, 2012 at 11:01 pm

    Cool, thanks guys – I’ve had a “fiddle” (see what I did there?) – what do you reckon? //jsfiddle.net/andyunleashed/X4pLt/7/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.