iframe与pdf黑色闪烁(闪烁) [英] Iframe with pdf black flickering(blinking)

查看:302
本文介绍了iframe与pdf黑色闪烁(闪烁)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的页面上有一个iframe与pdf,并在滚动iframe时尝试禁用主窗口的滚动。下面是它的代码:

I have an iframe with pdf on my page and try to disable scrolling of main window while scrolling iframe. Here is the code for it:

$('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)。

But such css changes causing flickering of iframe content (using Chrome 13). How can i fix this blinking?

推荐答案

如果你想在所有的浏览器和操作系统上工作,是使用自定义滚动条,例如
微小滚动条,或者您可以在此滚动列表< a href =http://www.net-kit.com/jquery-custom-scrollbar-plugins/ =nofollow> http://www.net-kit.com/jquery-custom-scrollbar-plugins / 。

If you want to work on all browsers and OS, the only way is to use custom scrollbars such as Tiny scrollbar or you can take a loot at this scrollbars list http://www.net-kit.com/jquery-custom-scrollbar-plugins/.

这篇关于iframe与pdf黑色闪烁(闪烁)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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