歌剧中的css背景过渡通过黑色 [英] css background transition in opera goes through black

查看:95
本文介绍了歌剧中的css背景过渡通过黑色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚进入CSS3过渡(大约是时间!),我在Opera 11.60中目睹了一些奇怪的行为.

I'm just getting into CSS3 transitions (about time!) and I witness some strange behavior in Opera 11.60.

我使用过渡将元素从background:none更改为background:#fff.但是,过渡实际上是在达到目标之前先经过黑色/深灰色.

I use a transition to change an element from background:none to background:#fff. However, the transition actually goes through black/dark grey before reaching its target.

现在,我可以理解为什么会发生这种情况-不透明性和颜色会同时进行动画处理,并且由于颜色以前是none,因此Opera将其视为#000.对我来说似乎是个虫子.

Now, I can understand why this happens - the opacity and the color are animated at the same time, and since the color used to be none, Opera regards it as #000. Looks like a bug to me.

除了关闭Opera中具有background:none元素的过渡之外,是否有办法解决此问题?

Is there a way to fix this, save for turning off transitions in Opera for elements with background:none?

推荐答案

如何尝试从background: rgba(255,255,255,0)background: rgba(255,255,255,1)的过渡? (从不透明度为零的白色到不完全透明度为白色).

How about trying a transition from background: rgba(255,255,255,0) to background: rgba(255,255,255,1)? (That’s from white with zero opacity to white with full opacity.)

例如参见 http://jsfiddle.net/tajMG/

这篇关于歌剧中的css背景过渡通过黑色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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