Strange Box-shadow bug on Chrome 51 while scrolling

允我心安 提交于 2019-12-06 07:35:00

问题


So while making a website I discovered a strange box-shadow bug on Chrome 51, my website has a fixed header with a box-shadow, and when I scroll up or down the box-shadow leaves some marks (horizontal gray lines) :

Also I can't reproduce this bug on a jsfiddle (link of the fiddle) and on other browsers like Firefox or Internet Explorer.

Is it a bug? What could be the problem?

UPDATE 1

It seems to work on Chrome 49


回答1:


I encountered this bug. I don't know what causes this but here's a simple way to fix it:

Add 0.1px to the shadow's blur

box-shadow: 0 2px 0.1px #yourcolor;

The lines should disappear that way and the blur isn't really visible.



来源:https://stackoverflow.com/questions/37612255/strange-box-shadow-bug-on-chrome-51-while-scrolling

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