RGBa在Internet Explorer中 [英] RGBa in Internet Explorer

查看:204
本文介绍了RGBa在Internet Explorer中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道IE不支持RGBa。我也知道你可以使用以下方法:

I know that IE does not support RGBa. I also know that you can use the follow methods:

/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";

Colorstr中的前两个数字是不透明度的值。其中99是.6不透明度。对于其他级别的不透明度,数值是多少?我找不到他们。有一个简单的方法来计算不透明度的数量?或在哪里可以找到这些值?

The first two Numbers in the "Colorstr" is the value for the opacity. with 99 being a .6 opacity. For other levels of opacity what are the number values? I cannot find them. Is there a simple way to calculate the number for opacity? Or where can I find those values?

感谢=>

推荐答案

看起来像是1字节十六进制,所以只要这样做

Looks like it's straight 1-byte hexadecimal, so just do this

说你的不透明度是30%:

Say your opacity is 30%:

.30 * 255 = 76.5
76 -> hex = 4C

您可以使用各种桌面工具, JS函数:

You can convert decimal to hex using a variety of desktop tools, online pages, or this JS function:

new Number(76).toString(16);

这篇关于RGBa在Internet Explorer中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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