CSS hsl() လုပ်ဆောင်ချက်
ဥပမာ
မတူညီသော HSL အရောင်များကို သတ်မှတ်ပါ-
#p1 {background-color:hsl(120,100%,50%);} /* green */
#p2 {background-color:hsl(120,100%,75%);} /* light green */
#p3 {background-color:hsl(120,100%,25%);} /* dark green */
#p4 {background-color:hsl(120,60%,70%);} /* pastel green */
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
hsl() လုပ်ဆောင်ချက်သည် Hue-saturation-lightness model (HSL) ကို အသုံးပြု၍ အရောင်များကို သတ်မှတ်သည်။
HSL သည် အသွေးအရောင်၊ ပြည့်ဝမှုနှင့် ပေါ့ပါးမှုကို ကိုယ်စားပြုပြီး အရောင်များ၏ cylindrical-coordinate ကိုယ်စားပြုမှုကို ကိုယ်စားပြုသည်။
ဗားရှင်း- | CSS3 |
---|
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် လုပ်ဆောင်ချက်ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Function | |||||
---|---|---|---|---|---|
hsl() | 1.0 | 9.0 | 1.0 | 3.1 | 9.5 |
CSS Syntax
hsl(hue, saturation, lightness)
Value | Description |
---|---|
hue | Defines a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue |
saturation | Defines the saturation; 0% is a shade of gray and 100% is the full color (full saturation) |
lightness | Defines the lightness; 0% is black, 50% is normal, and 100% is white |