Forums

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

Home Forums CSS make animation hover like transition hover

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #204583
    mahyar33
    Participant

    i want to change color gray to green then aqua when my element is hover and when mouse go out of element:
    if my element is green go to gray
    if my element is aqua go to green then gray
    More accurate i want to make transtion but for 3 colors
    when we use transtion for change 2 colors the result is great becuase when mouse go out of element, color change Gradually to first value like gray but in animation when mouse go out of element color very fast change to gray
    What is the solution??

    this is my code but not working:

    http://codepen.io/mahyar33/pen/pJLvjK

    #204585
    Paulie_D
    Member

    Not possible with a transition.

    A transition is from one state to another…that is from one value to a single different value.

    Although you can apply an animation on hover, as far as I know, you can’t transition an animation.

    You need javascript.

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