CSS conic-gradient() လုပ်ဆောင်ချက်
ဥပမာ
အရောင်သုံးမျိုးရှိသော conic gradient
#grad {
background-image: conic-gradient(red, yellow,
green);
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
conic-gradient() လုပ်ဆောင်ချက်သည် conic gradient ကို နောက်ခံပုံအဖြစ် သတ်မှတ်သည်။
conic gradient သည် ဗဟိုပွိုင့်တစ်ဝိုက်တွင် လှည့်ပတ်ထားသော အရောင်အကူးအပြောင်းများရှိသော gradient တစ်ခုဖြစ်သည်။
conic gradient ဖန်တီးရန် အနည်းဆုံး အရောင်မှတ်တိုင်နှစ်ခု သတ်မှတ်ရပါမည်။
Conic Gradient ၏ ဥပမာ-
ဗားရှင်း- | CSS3 |
---|
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် လုပ်ဆောင်ချက်ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Function | |||||
---|---|---|---|---|---|
conic-gradient() | 69.0 | 79.0 | 83.0 | 12.1 | 56.0 |
CSS Syntax
background-image: conic-gradient([from angle] [at position,] color degree, color degree, ...);
Value | Description |
---|---|
from angle | Optional. The entire conic gradient is rotated by this angle. Default value is 0deg |
at position | Optional. Specifies the gradient center of the conic gradient. Default value is center |
color degree, ..., color degree | Color stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by an optional stop position (a degree between 0 and 360 or a percent between 0% and 100%). |
နောက်ထပ် ဥပမာများ
ဥပမာ
အရောင်ငါးမျိုးရှိသော conic gradient တစ်ခု
#grad {
background-image: conic-gradient(red, yellow, green, blue,
black);
}
ဥပမာ
အရောင်တစ်ခုစီအတွက် အရောင်သုံးရောင်နှင့် ဒီဂရီတစ်ခုပါရှိသော conic gradient တစ်ခု-
#grad {
background-image: conic-gradient(red 45deg, yellow 90deg, green 210deg)
}
ဥပမာ
ဘောင်-အချင်းဝက်ကို ပေါင်းထည့်ခြင်းဖြင့် အဝိုင်းပုံကြီး အသွင်အပြင်ကို ပုံသဏ္ဍန်ဖြစ်အောင် ဖန်တီးပါ- 50%-
#grad {
background-image: conic-gradient(red, yellow, green, blue,
black);
border-radius: 50%;
}
ဥပမာ
ထောင့်မှ ပုံသဏ္ဍာန် ပုံသဏ္ဍာန်တစ်ခု-
#grad {
background-image: conic-gradient(from 90deg, red, yellow, green);
border-radius: 50%;
}
ဥပမာ
အနေအထားတစ်ခုပါရှိသော ပုံသဏ္ဍာန်အရောင်အဆင်း-
#grad {
background-image: conic-gradient(at 60% 45%, red, yellow, green);
border-radius: 50%;
}
ဥပမာ
ထောင့်မှလည်းကောင်း၊ အနေအထားတွင် နှစ်မျိုးလုံးပါရှိသော conic gradient တစ်ခု-
#grad {
background-image: conic-gradient(from 90deg at 60% 45%, red, yellow, green);
border-radius: 50%;
}
ဥပမာ
အခြားအဝိုင်းပုံဇယား-
#grad {
background-image: conic-gradient(red 0deg, red 90deg, yellow
90deg, yellow 180deg, green 180deg);
border-radius: 50%;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS Gradients