CSS background image disappearing in Chrome

痞子三分冷 提交于 2019-11-29 06:07:36

I don't know if this is the same issue, but the root is probably the same: http://code.google.com/p/chromium/issues/detail?id=111218. Based on that report, I don't think there's a known fix yet.

I had the same problem and diagnosed it for hours, but it's not about your code, it's a memory related bug in latest chrome. In my experience it doesn't happen to small images, so a temporary solution would be to decrease the file size (to under 10kB or so).

I have a test file here, showing the difference between a big and a small background image.

http://kolina.fi/chrometest.html

We worked up a solution for this issue until Chromium/Chrome "fixes the glitch" (hi, Milton)...

My colleague, Andrew, posted our solution here: http://blog.andrewcantino.com/blog/2012/02/15/fixing-the-chrome-background-refresh-bug/

You can see the page in question at: http://www.mavenlink.com/tour

It sounds like this has worked for others as well, but it's ugly!

I've recently had this issue, and the fix was to use the complete url, rather than a relative path.

E.g. change url(images/image.png)

to

url("http://yoursite.com/images/image.png")

Use :url(.//images path. The .// should solve the problem.

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