2011-08-26 162 views
4

我有我的网页上的PDF与iframe,并尝试禁用滚动iframe时滚动主窗口。这里是它的代码:Iframe与pdf黑色闪烁(闪烁)

$('iframe') 
    .mouseover(function() { 
     var html = $('html'); 
     html.data('previous-overflow', html.css('overflow')); 
     html.css('overflow', 'hidden'); 
     html.css('margin-right', '17px'); 
    }) 
    .mouseout(function() { 
     // un-lock scroll position 
     var html = $('html'); 
     html.css('overflow', html.data('previous-overflow')); 
     html.css('margin-right', '0px'); 
    }); 

但这样的css更改导致iframe内容闪烁(使用Chrome 13)。 我该如何解决这个问题?

+0

您是否有代码运行的示例页面? – MarkG

+0

是的,主机在这里:http://dima.staticloud.com/ 我使用铬没有任何pdf插件 – Dima

+1

你是说如果你禁用css更改闪烁不会发生?这似乎是铬的PDF查看器 – MarkG

回答