CSS rgba() လုပ်ဆောင်ချက်
ဥပမာ
ခြားနားသော RGB အရောင်များကို အလင်းအမှောင် (RGBA) ဖြင့် သတ်မှတ်ပါ-
#p1 {background-color:rgba(255,0,0,0.3);} /* red with opacity*/
#p2 {background-color:rgba(0,255,0,0.3);} /* green with opacity */
#p3 {background-color:rgba(0,0,255,0.3);} /* blue with opacity */
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
rgba() လုပ်ဆောင်ချက်သည် Red-green-blue-alpha (RGBA) မော်ဒယ်ကို အသုံးပြု၍ အရောင်များကို သတ်မှတ်သည်။
RGBA အရောင်တန်ဖိုးများသည် အယ်လ်ဖာချန်နယ်တစ်ခုနှင့် RGB အရောင်တန်ဖိုးများ၏ တိုးချဲ့မှုတစ်ခုဖြစ်သည် - အရောင်၏ အလင်းအားကို သတ်မှတ်ပေးသည်။
ဗားရှင်း- | CSS3 |
---|
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် လုပ်ဆောင်ချက်ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Function | |||||
---|---|---|---|---|---|
rgba() | 1.0 | 9.0 | 3.0 | 3.1 | 10.0 |
CSS Syntax
rgba(red, green, blue, alpha)
Value | Description |
---|---|
red | Defines the intensity of red as an integer between 0 and 255, or as a percentage value between 0% and 100% |
green | Defines the intensity of green as an integer between 0 and 255, or as a percentage value between 0% and 100% |
blue | Defines the intensity of blue as an integer between 0 and 255, or as a percentage value between 0% and 100% |
alpha | Defines the opacity as a number between 0.0 (fully transparent) and 1.0 (fully opaque) |