继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

jquery hover ie bug

慕田峪0738999
关注TA
已关注
手记 344
粉丝 88
获赞 493

 I declare a div without content but with a defined width and height in order to show some info. I have no problems with the hover effect in mozilla or opera but in IE8, the info appears and instantly appears and disappears and there is no time to read it i also add a 
or a   but this doesn't work. It works if i apply a background to the div. Is this a bug??

 

--查了一个下午才找出原因,就是比如说一个一级导航菜单用ul li构造,其中li下面含有二级菜单,li用position:relative,下面的二级菜单为div包含的内容,并用position:absolutely进行定位,但是如果二级菜单的div不设定css中的background的话鼠标离开一级菜单进入二级菜单则二级菜单仍然消失,仿佛jquery的hover函数中并没有解决ie的bug,解决此问题的方法是加background:#fff;

fuck,最后在jquery的官网也找到了一年前的一个哥们遇到了类似的情况,见上面的英文部分!

 

 

 

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP