固定标头表,在div滚动条图标单击时使用IE11(Internet Explorer)中的Jquery闪烁滚动. [英] Fixed header Table, on scroll using Jquery flickers in IE11 (internet explorer) on click of div scroll bar icon click.

查看:41
本文介绍了固定标头表,在div滚动条图标单击时使用IE11(Internet Explorer)中的Jquery闪烁滚动.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

固定表头____当使用定位时,在ie11上单击滚动条图标时会闪烁,因为我无法更改结构,因为它动态地来自不同的来源并进入表主体结构

FIXED HEADER TABLE ____When Clicking on scrollbar icon in ie11 flickers when using positioning as i cannot change the structure as it is dynamically coming from different sources and gets in table body structure

<tbody><tr></tr><tr></tr></tbody>

这是附加的小提琴,在chrome中效果很好,但是当我签入时,即单击图标上方或下方的div垂直滚动条时,它闪烁得很可怕

here is the fiddle attached works fine in chrome but when i check in ie it flickers horriblly when clicking on div vertical scrollbar below or above icon

任何Css或html解决方案也是可以接受的,除非html结构没有变化

Any Css or html solution is also acceptable until if there is no change in html structure

DEMO JQUERY

DEMOJs Fiddle Demo JQUERY

   $(document).ready(function() {
$('#theDiv').on('scroll', function () { 
                $('#headerRow td,#headerRow th').css({'position':'relative','background':'red','top':$('#theDiv').scrollTop()-1});
});
    });

推荐答案

由于Ie不支持表组元素的溢出属性.因此,我们可以添加一种变通方法来支持所需的行为.将此CSS添加到您的小提琴中,然后尝试使用.

As Ie doesn't support overflow property for table group elements. So we can add a workaround to support the required behaviour. Add this css to your fiddle and try it will work.

tbody{display:block;height:auto;}

这将使您的闪烁在较旧的版本中消失.尽管使其工作正常,但没有其他纯CSS方式.有关更多详细信息和解释,您可能需要阅读以下内容:链接.更新的小提琴位于此处.但是正如您告诉我的那样,闪烁不会消失.存在一种解决方法,但是它需要更改即设置.转到互联网选项,导航至高级并向下滚动,直到看到浏览部分,然后取消选中启用平滑滚动" .但我不知道它是否符合您的要求

This will make your flicker go away in ie older versions. Although its a hack to make it work but there is no other pure css way. For more details and explanation you may want to read this link. Updated fiddle is here. But as you told me flickering not goes away.A workaround exists but it requires changing in ie settings. Go to internet options, navigate to advanced and scroll down until you see browsing section and uncheck "enable smooth scrolling". But I don't know whether it suits your requirement or not

这篇关于固定标头表,在div滚动条图标单击时使用IE11(Internet Explorer)中的Jquery闪烁滚动.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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