CSS repeating-linear-gradient() လုပ်ဆောင်ချက်
ဥပမာ
ထပ်ခါတလဲလဲ မျဉ်းဖြောင့်အရောင်အဆင်း-
#grad {
background-image: repeating-linear-gradient(red, yellow 10%, green 20%);
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ထပ်ခါတလဲလဲ-linear-gradient() လုပ်ဆောင်ချက်ကို linear gradient များကို ထပ်ခါတလဲလဲလုပ်ရန်အတွက် အသုံးပြုပါသည်။
ဗားရှင်း- | CSS3 |
---|
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် လုပ်ဆောင်ချက်ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
-webkit-၊ -moz- သို့မဟုတ် -o- ဖြင့်လိုက်သောနံပါတ်များသည် ရှေ့ဆက်တွဲတစ်ခုနှင့်အလုပ်လုပ်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပေးသည်။
Function | |||||
---|---|---|---|---|---|
repeating-linear-gradient() | 26.0 10.0 -webkit- |
10.0 | 16.0 3.6 -moz- |
6.1 5.1 -webkit- |
12.1 11.1 -o- |
CSS Syntax
background-image: repeating-linear-gradient(angle | to side-or-corner, color-stop1,
color-stop2, ...);
Value | Description |
---|---|
angle | Defines an angle of direction for the gradient. From 0deg to 360deg. Default is 180deg. |
side-or-corner | Defines the position of the starting-point of the gradient line. It consists of two keywords: the first one indicates the horizontal side, left or right, and the second one the vertical side, top or bottom. The order is not relevant and each of the keyword is optional. |
color-stop1, color-stop2,... | 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 percentage between 0% and 100% or a length along the gradient axis). |
နောက်ထပ် ဥပမာများ
ဥပမာ
ကွဲပြားသော ထပ်ခါတလဲလဲ မျဉ်းဖြောင့်အရောင်များ
#grad1 {
background-image: repeating-linear-gradient(45deg,
red, blue 7%, green 10%);
}
#grad2 {
background-image: repeating-linear-gradient(190deg, red, blue 7%,
green 10%);
}
#grad3 {
background-image:
repeating-linear-gradient(90deg, red, blue 7%, green 10%);
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS Gradients