CSS နောက်ခံအတိုကောက်
CSS နောက်ခံ - အတိုကောက် ပိုင်ဆိုင်မှု
ကုဒ်ကို အတိုချုံ့ရန်၊ ပိုင်ဆိုင်မှုတစ်ခုတည်းတွင် နောက်ခံဂုဏ်သတ္တိအားလုံးကို သတ်မှတ်နိုင်သည်။ ဒါကို အတိုကောက် ဥစ္စာလို့ ခေါ်တယ်။
စာရေးမယ့်အစား
body {
background-color: #ffffff;
background-image:
url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
}
အတိုကောက် ပိုင်ဆိုင်မှုကို သင်သုံးနိုင်သည် background
။
ဥပမာ
ကြေငြာချက်တစ်ခုတွင် နောက်ခံဂုဏ်သတ္တိများကို သတ်မှတ်ရန် လက်တိုပိုင်ဆိုင်မှုကို အသုံးပြုပါ-
body {
background: #ffffff url("img_tree.png") no-repeat right top;
}
အတိုကောက် ပိုင်ဆိုင်မှုကို အသုံးပြုသောအခါ ပိုင်ဆိုင်မှုတန်ဖိုးများ၏ အစီအစဥ်မှာ-
background-color
background-image
background-repeat
background-attachment
background-position
အခြားအရာများသည် ဤအစီအစဥ်အတိုင်း ရှိနေသရွေ့ ပိုင်ဆိုင်မှုတန်ဖိုးများထဲမှ တစ်ခု ပျောက်ဆုံးသွားပါက အရေးမကြီးပါ။ တန်ဖိုးတစ်ခုမရှိသောကြောင့် အထက်ဖော်ပြပါဥပမာများတွင် နောက်ခံ-ပူးတွဲပါပစ္စည်းကို ကျွန်ုပ်တို့အသုံးမပြုကြောင်း သတိပြုပါ။
CSS Background Properties အားလုံး
Property | Description |
---|---|
background | Sets all the background properties in one declaration |
background-attachment | Sets whether a background image is fixed or scrolls with the rest of the page |
background-clip | Specifies the painting area of the background |
background-color | Sets the background color of an element |
background-image | Sets the background image for an element |
background-origin | Specifies where the background image(s) is/are positioned |
background-position | Sets the starting position of a background image |
background-repeat | Sets how a background image will be repeated |
background-size | Specifies the size of the background image(s) |