һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+

[CSS] ͸ֲ͸ѷIE

[]
56024 websjy 2013-7-3 14:54:53
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x
     Rɫֵ | ٷ
                Gɫֵ | ٷ
                Bɫֵ | ٷ
                A͸ȡȡֵ0~1֮
            
            ȡֵ<length> Hue(ɫ) 0(360)ʾɫ120ʾɫ240ʾɫȻȡֵȷɫ<percentage> Saturation(Ͷ) ȡֵΪ0%100%ֵ֮<percentage> Lightness() ȡֵΪ0%100%ֵ֮ <opacity> alpha(͸) ȡֵ01֮䣻            
            ˵  RGBɫģʽҲΪȽãǹҵһɫ׼ͨԺ(R)(G)(B)ɫͨı仯Լ໥֮ĵõʽɫģRGBǴ졢̡ͨɫ׼ܸ֪ɫĿǰɫϵͳ֮һ
                RGBARGBĻ϶˿alpha͸ȵIJRGBֵȡֵΧΪ0 - 255ٷֵȡֵΧΪ0.0% - 100.0%Χֵӽȡֵޡ֧ʹðٷֵAȡֵ0~1֮䣬Ϊֵ
            
            ԣ                 
Internet ExplorerFirefoxChromeOperaSafari
()IE6()Firefox 3.0.10()Chrome 2.0.x()Opera 9.64()Safari 4
()IE7()Firefox 3.5


()IE8



()IE9




---------------------ʽʼ----------------------------

Աɫ͸0.5

IEbackground:rgba(0,0,0,0.5);

IE filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000);

PS#7f000000  7f͸0.5ת16Ƶֵ000000Ǻɫ16ֵʮɫhttp://bbs.websjy.com/thread-10653-1-1.html

ֵתԲο
rgba IEfilterֵת
rgba ͸ֵIEfilterֵ
0.119
0.233
0.34C
0.466
0.57F
0.699
0.7B2
0.8C8
0.9E5

ֱȡģûнλֱȥ
alpha*255ת16Ƽ


RGBɫģʽҲΪȽãǹҵһɫ׼ͨԺ(R)(G)(B)ɫͨı仯Լ໥֮ĵõʽɫģRGBǴ졢̡ͨɫ׼ܸ֪ɫĿǰɫϵͳ֮һ

RGBARGBĻ϶˿alpha͸ȵIJRGBֵȡֵΧΪ0 C 255ٷֵȡֵΧΪ0.0% C 100.0%Χֵӽȡֵޡ֧ʹðٷֵAȡֵ0~1֮䣬Ϊֵ
RGBA﷨


:
  1. div {
  2. background: rgba(0, 0, 0, 0.5);
  3. }
ƴ
ԣ
Internet ExplorerFirefoxChromeOperaSafari
()IE6()Firefox 3.0.10()Chrome 2.0.x()Opera 9.64()Safari 4
()IE7
()IE8
()IE9

RGBAopacity
opacityʹԪذԪ͸RGBAԪر͸,Ԫز͸
彲IE֧RGBAɫ
һCSSPIE
CSSPIEcolorbackground box-shadow֧RGBA

ʾ

:
  1. div{
  2. color:rgba(0,0,0,.5);
  3. background:rgba(0,0,0,.5);
  4. -pie-background:rgba(0,0,0,.5);/*IE6-8*/
  5. box-shadow: 1px 1px rgba(0,0,0,.5);/*δģֵ֧rgba*/
  6. }
ƴ
filter
ͨIE˾ñɫ͸ģrgbaЧ
ʾ



:
  1. .filter{
  2. filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#BF000000,endColorstr=#BF000000);
  3. }
ƴ
ҪStartColorStrEndColorStrֵǰλʮƵ͸ȣλʮƵɫ
㷽x=alpha*255 ĽxתʮƼ

rgbg ת ڶ¥

Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
 ¥| websjy 2013-7-3 14:55:30
| ʾȫ¥
2F
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ ֧
kaorou39 2015-5-27 14:27:25
| ʾȫ¥
4F
Ҫ,¥ͷDz
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ ֧
fhuj3d96 2017-2-13 19:37:41
| ʾȫ¥
5F
̫˽ģò
װι˾ļҺ             http://www.wtjsn.com/
ϲװƹ˾             http://www.wtjsn.com/
ϲװι˾             http://www.wtjsn.com/
õװι˾             http://www.wtjsn.com/
й֤         http://www.rlzlt.com/
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ ֧
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2018-7-17 14:08

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б