MouseOver and MouseOut In CSS

前端 未结 4 1448
有刺的猬
有刺的猬 2020-12-23 17:40

For using mouse into one element we use the :hover CSS attribute. How about for mouse out of the element?

I added a transition effect on the element to

4条回答
  •  既然无缘
    2020-12-23 18:15

    I think that I've found the solution.

    .class :hover {
        /*add your animation of mouse enter*/
    }
    
    .class {
        /*
        no need for not(hover) or something else. 
        Just write your animation here and it will work when mouse out
        */
    }
    

    Just try it... :)

提交回复
热议问题