CSS နောက်ခံ Property
ဥပမာ
ကြေငြာချက်တစ်ခုတွင် မတူညီသောနောက်ခံဂုဏ်သတ္တိများကို သတ်မှတ်ပါ-
body
{
background: lightblue url("img_tree.gif") no-repeat fixed center;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှုသည် အောက်ပါ background
တို့အတွက် အတိုကောက်ပိုင်ဆိုင်မှုတစ်ခုဖြစ်သည်။
- နောက်ခံအရောင်
- နောက်ခံပုံ
- နောက်ခံအနေအထား
- နောက်ခံအရွယ်အစား
- နောက်ခံ-အထပ်ထပ်
- နောက်ခံ-ဇာစ်မြစ်
- နောက်ခံကလစ်
- နောက်ခံ-တွယ်တာမှု
အထက်ဖော်ပြပါတန်ဖိုးများထဲမှ တစ်ခုပျောက်ဆုံးနေပါက အရေးမကြီးပါ ၊ ဥပမာ နောက်ခံ:#ff0000 url(smiley.gif); ခွင့်ပြုထားသည်။
မူလတန်ဖိုး: | တစ်ဦးချင်းဂုဏ်သတ္တိများကိုကြည့်ပါ။ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်ကဲ့၊ တစ်ဦးချင်းဂုဏ်သတ္တိများကိုကြည့်ပါ ။ ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 တွင် CSS1 + ဂုဏ်သတ္တိအသစ်များ |
JavaScript syntax- | အရာဝတ္တု .style.background="red url(smiley.gif) အပေါ်ဘယ်ဘက်တွင် ထပ်တလဲလဲ မပြုလုပ်ပါ" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
background | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
မှတ်ချက်- အောက်ဖော်ပြပါ တန်ဖိုးတစ်ခုစီအတွက် ဘရောက်ဆာတစ်ခုချင်းစီ၏ ပံ့ပိုးမှုကို ကြည့်ပါ။
CSS Syntax
background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;
မှတ်ချက်- အတိုကောက်ကြေငြာချက်ရှိ ဂုဏ်သတ္တိများထဲမှ တစ်ခုသည် bg အရွယ်အစား ပိုင်ဆိုင်ခြင်းဖြစ်ပါက၊ ၎င်းကို bg-ရာထူးပိုင်ဆိုင်မှုနှင့် ခွဲရန်၊ ဥပမာ- နောက်ခံ:url(smiley.gif) 10px 20px/50px 50px 50px ; ဘယ်ဘက်မှ 10 ပစ်ဇယ်များ ၊ ထိပ်မှ 20 ပစ်ဇယ်များကို နောက်ခံပုံအဖြစ် ထားရှိပေးမည်ဖြစ်ပြီး ရုပ်ပုံအရွယ်အစားသည် 50 pixels အနံနှင့် 50 pixels မြင့်မားမည်ဖြစ်ပါသည်။
မှတ်ချက်- နောက်ခံ-ပုံရင်းမြစ်များစွာကို အသုံးပြုသော်လည်း နောက်ခံအရောင်ကို လိုချင်ပါက၊ နောက်ခံအရောင် ကန့်သတ်ချက်သည် စာရင်းထဲတွင် နောက်ဆုံးဖြစ်ရန် လိုအပ်သည်။
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | CSS |
---|---|---|
background-color | Specifies the background color to be used | 1 |
background-image | Specifies ONE or MORE background images to be used | 1 |
background-position | Specifies the position of the background images | 1 |
background-size | Specifies the size of the background images | 3 |
background-repeat | Specifies how to repeat the background images | 1 |
background-origin | Specifies the positioning area of the background images | 3 |
background-clip | Specifies the painting area of the background images | 3 |
background-attachment | Specifies whether the background images are fixed or scrolls with the rest of the page | 1 |
initial | Sets this property to its default value. Read about initial | 3 |
inherit | Inherits this property from its parent element. Read about inherit | 2 |
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ ၊ CSS နောက်ခံများ (အဆင့်မြင့်)
HTML DOM ရည်ညွှန်းချက်- နောက်ခံပိုင်ဆိုင်မှု