mouseleave
时间: 2023-09-24 22:05:02 浏览: 90
mouseleave事件在鼠标指针离开被选元素时触发,不论鼠标指针离开被选元素还是任何子元素,都会触发该事件。与之相似的是mouseout事件,但两者有一些不同之处。不同之处在于mouseleave事件不冒泡,而mouseout事件会冒泡。这意味着当鼠标指针退出元素及其所有后代时,mouseleave事件会触发,而mouseout事件在鼠标指针离开元素或离开元素的后代之一时触发(即使指针仍在元素内)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [mouseenter和mouseleave与mouseover和mouseout的区别](https://blog.csdn.net/xm_w_xm/article/details/89400939)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [js中鼠标事件mouseover、mouseenter和mouseleave、mouseout的区别](https://blog.csdn.net/JackieDYH/article/details/117234168)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [mouseenter&mouseleave](https://blog.csdn.net/weixin_42895400/article/details/81902893)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文