Html Chrome重新绘制背景图像
页面包含相同的背景图像,如果我们检查ChromeDevTools,它会显示背景图像来自缓存,但每次屏幕清除时,我们都会得到Chrome中闪烁的效果(实际上是熨斗)。相比之下,Firefox没有这种行为,它不会每次都重新绘制cahed图像。 这是铬的正常行为吗Html Chrome重新绘制背景图像,html,css,google-chrome,jsf,background-image,Html,Css,Google Chrome,Jsf,Background Image,页面包含相同的背景图像,如果我们检查ChromeDevTools,它会显示背景图像来自缓存,但每次屏幕清除时,我们都会得到Chrome中闪烁的效果(实际上是熨斗)。相比之下,Firefox没有这种行为,它不会每次都重新绘制cahed图像。 这是铬的正常行为吗 body { background-image: url(#{resource['images:fon.png']}); background-position: center top; background-rep
body {
background-image: url(#{resource['images:fon.png']});
background-position: center top;
background-repeat: no-repeat;
overflow-x: hidden;
}
你能发布一些相关的代码以便我们测试它吗?@AbhinavGauniyal updated我认为闪烁是由于加载css文件和其他资源所花费的时间造成的。你试过把上面的css放在一个内联语句中吗?@user3845133那么为什么firefox和opera中没有Flash呢?我想是不同的缓存/渲染机制吧……例如,如果你缺少图像,firefox会在加载所有其他资源后立即触发load事件,但在Chrome中,您必须等待一段时间才能启动事件。你检查过css是否也被缓存了吗?