Chrome中的CSS rgba透明度错误? [英] CSS rgba transparency bug in Chrome?

查看:376
本文介绍了Chrome中的CSS rgba透明度错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只要放置白色背景和任何不透明度值的DIV:

  background-color:rgba(255,255,255 ,.5);在一个白色(255x3)背景上的

。其实DIV的背景将是254/254/254。这只发生在Chrome。

解决方案

p>这看起来像一个错误!



我可以确认这种不当行为。也可以通过使用 background:rgba(255,255,255,0.1)。更奇怪的是:计算风格说 background-color:rgba(255,255,255,0.0980392)



在使用TN技术的较便宜的显示器上很难看到,但仍然可以用例如截图和测量Photoshop。



此问题类似于:

webkit错误:输入的背景在没有任何焦点原因的情况下变灰?


Just placing a DIV with white background and any opacity value:

background-color: rgba(255, 255, 255, .5);

over a white (255x3) background. Actually DIV's background will be 254/254/254. This happen only in Chrome. FF/IE/Opera/Safari is ok.

Bug?

解决方案

This looks like a bug!

I can confirm this misbehaviour. Got it also by using background: rgba(255,255,255,0.1). More weird: the calculated style says background-color: rgba(255, 255, 255, 0.0980392)

It is hard to see on cheaper displays using TN technology, but still possible to screenshot and measure with e.g. Photoshop.

This question is similar to:
webkit bug: input's background gets gray without any reason on focus?

这篇关于Chrome中的CSS rgba透明度错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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