CSS နောက်ခံ-ဇာစ်မြစ် ပိုင်ဆိုင်မှု
ဥပမာ
အကြောင်းအရာ၏ ဘယ်ဘက်အပေါ်ထောင့်မှ နောက်ခံ-ပုံကို စတင်ခွင့်ပြုပါ-
#example1 {
border: 10px dashed black;
padding:
25px;
background: url(paper.gif);
background-repeat: no-repeat;
background-origin:
content-box;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှု သည် background-origin
နောက်ခံပုံတစ်ခု၏ မူလနေရာ (နောက်ခံနေရာချထားခြင်းဧရိယာ) ကို သတ်မှတ်ပေးသည်။
မှတ်ချက် ။ _ _
မူလတန်ဖိုး: | padding-box |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.backgroundOrigin="content-box" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
background-origin | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
CSS Syntax
background-origin: padding-box|border-box|content-box|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
padding-box | Default value. The background image starts from the upper left corner of the padding edge | |
border-box | The background image starts from the upper left corner of the border | |
content-box | The background image starts from the upper left corner of the content | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
<div> ဒြပ်စင်အတွက် နောက်ခံပုံနှစ်ခုကို သတ်မှတ်ပါ။ "paper.gif" နောက်ခံပုံအား padding edge ၏ ဘယ်ဘက်အပေါ်ထောင့်မှ စတင်ခွင့်ပြုပြီး "img_tree.gif" နောက်ခံပုံကို အကြောင်းအရာ၏ ဘယ်ဘက်အပေါ်ထောင့်မှ စတင်ခွင့်ပြုပါ-
#example1 {
border: 10px dashed black;
padding: 25px;
background: url(img_tree.gif), url(paper.gif);
background-repeat: no-repeat;
background-origin:
content-box, padding-box;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ များ
HTML DOM ရည်ညွှန်းချက်- backgroundOrigin ပိုင်ဆိုင်မှု