How to add a delay to CSS Vertical Dropdown Menu

前端 未结 2 627
礼貌的吻别
礼貌的吻别 2021-02-11 02:45

I am needing to add a delay to the mouseover event of my dropdown menu so that if someone mouses over the menu going to another link on page the menu will not drop down instantl

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-11 03:17

    You can use CSS3 Animation or Transition.

    http://www.css3maker.com/css3-animation.html

    http://www.css3maker.com/css3-transition.html

    Or you can handle timeouts in Javascript, I think a easy way is to attach a setTimeout before show(); and use clearTimeout on mouseleave event

提交回复
热议问题