Onmouseout In Css

Discussion in 'CSS' started by MuckyDucky, Feb 13, 2013.

  1. #1
    Good Afternoon,
    I'm trying to make a 'pure CSS' menu for my website and would like to add a transition of 'OnMouseOut', preferably in CSS.

    For example:
    #menu:onmouseout {
    // Code here
    }
    Code (markup):
    Please help me. Thanks. :)
     
    MuckyDucky, Feb 13, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    "out" is just the normal state of the element, so you'd put the 'out' transition there, and the 'in' transition (if different) on the :hover -- if they use the same effect/time (linear 0.5s for example) you just set it on the outermost element. Mind you depending on how you are handling the 'hide' when the menu isn't present you may need to add a 'delay' transition so that the 'out' animation has time to be shown.

    Do you have the code for said menu? CSS without the markup is gibberish.
     
    deathshadow, Feb 13, 2013 IP