Chrome redraw issue

后端 未结 3 1072
忘掉有多难
忘掉有多难 2020-12-13 17:59

I\'m getting an odd redraw issue in chrome:

\"Screenshot\"

See the broken right side? This is a d

3条回答
  •  醉梦人生
    2020-12-13 18:59

    I have had this kind of issue when toggling display:none; display:block;

    For example with jQuery.toggle()

    The element in question was just a wrapper for the content I wanted to show and hide. So this is its parent which would expand or shrink vertically. It would look like this:

    child-to-toggle had no styling rules and, when hidden, a part of the parent wasn't redrawn correctly. (the bottom part)

    Then, I added a css rule to child-to-toggle and the problem was solved. It looks like adding a css rule will force some redrawing in that case.

    Despite the accepted answer, I am adding this one because enabling hardware acceleration on my computer, Macbook pro, OSX Maverick, Chrome 36, would completely mess up the UI with artefacts so I had to find another way.

    Adding a css rule might help. In my case I added a border-top to child-to-toggle.

提交回复
热议问题