CSS背景图像在Chrome中消失 [英] CSS background image disappearing in Chrome

查看:54
本文介绍了CSS背景图像在Chrome中消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题仅发生在 Mac OS X (Chrome 17) 上的 Google Chrome 中.我已经在 Mac 和 Windows 7 上的所有主要浏览器上对其进行了测试.

This problem is only happening in Google Chrome on Mac OS X (Chrome 17). I've tested it on all the major browsers on Mac and Windows 7.

这里是有问题的页面:http://dealsfortherich.com/drop/

如您所见,我正在通过 JQuery AJAX 加载 div.页面在刷新"时总是很好.
您可以使用左右箭头浏览页面.换页时会出现问题;特别是当您快速滚动页面时更改页面.尝试快速向下滚动页面并点击右箭头.已经通过 CSS 加载的背景图片(例如):

As you can see, I'm loading divs via JQuery AJAX. The page is always fine on "Refresh."
You can navigate pages with the left and right arrows. The problem happens when you change pages; especially when you change pages when scrolling the page quickly. Try scrolling the page down very fast and hit the right arrow. The background images that were already loaded via CSS (for example):

.sort_block{ background: url(images/sort_block.png) no-repeat;}

开始消失.只有用 CSS 加载的背景图像才会开始消失.一切都很好.如果您在 Chrome 上打开开发者工具检查元素,您将看到浏览器具有正确的语法并且它已经将图像下载到其缓存中.由于某种原因,它只是无法显示它.CSS 显示值正确.在Inspector中,对于缺少背景的div,如果修改了top:8px;"这样的值到顶部:9px;"图像突然出现.

start to disappear. Only background images that are loaded with CSS start disappearing. All are fine. If you open Developer Tools on Chrome inspect the elements, you will see that the browser has the correct syntax and it has already downloaded the image into its cache. For some reason, it's just failing to display it. The CSS display value is correct. In the Inspector, for the div with the missing background, if you modify a value such as "top: 8px;" to "top: 9px;" the image suddenly appears.

这只发生在适用于 Mac OS X (10.7.3) 的 Chrome (v. 17) 和 Chrome Canary (v. 19) 中.我应该向 Google 报告此错误还是有已知的解决方法或修复?我想我可以用 s 替换 s 但我宁愿正确地做并解决这个奇怪的问题.

This is only happening in Chrome (v. 17) and Chrome Canary (v. 19) for Mac OS X (10.7.3). Should I report this bug to Google or is there a known work around or fix? I guess I can replace the s with s but I would rather do it correctly and fix this weird issue.

推荐答案

不知道是不是同一个问题,但根大概是一样的:http://code.google.com/p/chromium/issues/detail?id=111218.根据该报告,我认为还没有已知的修复方法.

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.

这篇关于CSS背景图像在Chrome中消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆