:当鼠标移动到div |内部的iframe上时发生hover问题IE浏览器 [英] :hover issue when mouse moves over an iframe which is inside the div | Internet Explorer

查看:811
本文介绍了:当鼠标移动到div |内部的iframe上时发生hover问题IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的问题:

我在浏览器窗口左侧创建了一个小栏 blokje {left:-180px;位置:绝对; ...} ,当用户悬停在栏上 - >位置更改使用 #blokje:hover {left:0};
所有这些都工作正常,但现在我已经添加了一个google adsense框架内的div和...一切正常,除了在IE(最常用的浏览器;广告...)

I have made a small bar in the left side of the browserwindow #blokje{left:-180px; position:absolute;...}, when users hover over the bar --> the position changes using #blokje:hover{left:0}; All this works fine, but now I've added a google adsense frame inside the div and... everything works fine except in IE (most used browser; ads...)

它看起来像div:hover消失在框架造成恼人的闪烁,用户无法点击广告!

It looks like the div:hover disappears over the frame causing annoying flickering and users are unable to click ads !

我认为一个可能的解决方案是使用jquery而不是css来执行悬停效果。有人可以把我的CSS翻译成jQuery吗?

I think that a possible solution would be to use jquery instead of css to perform the hover effect. Can someone translate my css for me to jQuery ?

#blokje{width:200px; height:200px; background:#F1F1F1; position:relative; left:-180px; color:black; }
#blokje:hover{left:0;}
#blokje #tit{position:absolute; width:30px; height:200px; background:black; right:0; top:0; }

fiddler 请注意,问题只出现在IE

fiddler explains the issue; please note that the problem is only in IE

http:// jsfiddle.net/6FeH8/

测试环境中的在线示例未缓存(注意:这是关于左侧不是404错误!)

The live example online in a test environment not cached (Note: it's about the bar in the left not the 404 error !)

http://kramels.x10.mx/goedkoopste-autolening.tk/

推荐答案

以下应实现你想要的效果。这是基于链接的答案。
jQuery:

The following should achieve the effect you want. This is based on the linked answer. jQuery:

    if($.browser.msie){
        $("#blokje iframe").on("hover",function(){ 
            $(this).parents("#blokje").toggleClass("hover");
        });
    }

CSS:

#blokje:hover,#blokje.hover{left:0;}

这篇关于:当鼠标移动到div |内部的iframe上时发生hover问题IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆