Chrome的最新更新后,我使用的背景css不再工作 [英] After Chrome's latest update, the background css I use no longer works

查看:185
本文介绍了Chrome的最新更新后,我使用的背景css不再工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是chrome调试器抱怨的行,它说它是无效的。此行在更新之前工作,我的更多用户开始遇到与更新浏览器相同的问题。

  background:url(https://www.playinitium.com/images/banner---town.jpg)50%50%/包含no-repeat rgb(30,43,83),rgb(30 ,43,83); 

不喜欢此行的Chrome版本是:Version 46.0.2490.71 m



有没有人知道任何规格变更不允许这个背景CSS行工作?



/ strong>



后来我意识到chrome代表背景CSS的方式不同于我设置它的方式。下面是如何设置:

  background:url('images / effects / light-rain1.gif')no-repeat中心中心,url('+ bannerUrl +')no-repeat center center,rgba(+ r +,+ g +,+ b +,+ amount +)

background- blend-mode:screen,multiply
background-size:contains,contain,contain,contains,contain,b $ b



有2台电脑,在一个有最新的Chrome它似乎没有混合,一个与稍早版本的chrome它是。



它也可能



>我只是比较两个Chromes之间的版本(之间的工作和不是一个),他们是相同的!唯一的区别是在更新Chrome之后立即开始失败的那个。



非常奇怪。

解决方案

原来这真的是一个Chrome的错误。其他人已开始在此报告问题:



https://code.google.com/p/chromium/issues/detail?id=543583


Below is the line the chrome debugger is complaining about, it says it is invalid. This line worked before the update and more of my users are starting to have the same problem as they update their browsers.

background: url(https://www.playinitium.com/images/banner---town.jpg) 50% 50% / contain no-repeat rgb(30, 43, 83), rgb(30, 43, 83);

The version of Chrome that doesn't like this line is: Version 46.0.2490.71 m

Does anyone know of any spec changes that would not allow this background CSS line to work?

EDIT

I realized later that the way chrome represents the background CSS is different than the way I set it. Here is how it is set:

background: url('images/effects/light-rain1.gif') no-repeat center center, url('"+bannerUrl+"') no-repeat center center, rgba("+r+", "+g+", "+b+", "+amount+")

        background-blend-mode: screen, multiply
        background-size: contain,contain,contain

I have 2 computers, on the one with the latest Chrome it doesn't appear to be blending, the one with a slightly earlier version of chrome it is.

It might also be pertinent to know that I dynamically set this using jQuery.

Edit 2

I just compared the versions between the two Chromes (between the one that works and the one that doesn't) and they are the same! The only difference is the one that started failing started immediately after updating my chrome.

So very strange.

解决方案

It turns out this really is a Chrome bug. Others have started to report the issue here:

https://code.google.com/p/chromium/issues/detail?id=543583

这篇关于Chrome的最新更新后,我使用的背景css不再工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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