Strange diagonal lines in Chrome/Chromium (bug?)

痴心易碎 提交于 2019-11-28 19:12:57

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.

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;
}

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!