Strange diagonal lines in Chrome/Chromium (bug?)

前端 未结 3 877
我寻月下人不归
我寻月下人不归 2020-12-14 02:00

When I use CSS filters, shadows, transformations, SVG (or similar), my Chrome/Chromium shows a strange diagonal lines:

    filter:drop-shadow(0px 0px 10px #d         


        
相关标签:
3条回答
  • 2020-12-14 02:21

    I was having the same issue in Chrome but I finally found that cleaning up the svg file solved the issue. I used SVGO https://github.com/svg/svgo.

    0 讨论(0)
  • 2020-12-14 02:39

    It's almost certainly this Chrome/Chromium rasterization bug, which appears to be specific to certain NVidia GPUs:

    Issue 691262 Corrupted background with GPU rasterization.

    0 讨论(0)
  • 2020-12-14 02:39

    As indicated above it is a GPU issue but the temporary workaround works great for me:

    div {
        position: relative;
        z-index: 0;
    }
    
    div:before {
        content: '';
        display: block;
        position: absolute;
        top: 0; right: 0; bottom: 0; left: 0;
        z-index: -1;
        background: inherit;
    }
    
    0 讨论(0)
提交回复
热议问题