image's transition




Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
switch处修改为:
因为
<li>和<img>的尺寸太接近,有时候mouseover是在<img>上触发,最后冒泡到<ul>上,事件目标是<img>,它没有 id,所以就出错了。在 handler 中要先判断一下目标的类型: