CSS နောက်ခံအရောင် ပိုင်ဆိုင်မှု
ဥပမာ
စာမျက်နှာတစ်ခုအတွက် နောက်ခံအရောင်ကို သတ်မှတ်ပါ-
body {background-color: coral;}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
background-color
ပိုင်ဆိုင်မှုသည် ဒြပ်စင်တစ်ခု၏ နောက်ခံအရောင်ကို သတ်မှတ်ပေးသည် ။
ဒြပ်စင်တစ်ခု၏နောက်ခံသည် padding နှင့် border (သို့သော်အနားသတ်မဟုတ်ပါ) အပါအဝင် element ၏ စုစုပေါင်းအရွယ်အစားဖြစ်သည်။
အကြံပြုချက်- စာသားကိုဖတ်ရလွယ်ကူစေသည့် နောက်ခံအရောင်နှင့် စာသားအရောင်ကို အသုံးပြုပါ။
မူလတန်ဖိုး: | ပွင့်လင်းသည်။ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်တယ် ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS1 |
JavaScript syntax- | အရာဝတ္ထု .style.backgroundColor="#00FF00" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
background-color | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS Syntax
background-color: color|transparent|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
color | Specifies the background color. Look at CSS Color Values for a complete list of possible color values. | |
transparent | Specifies that the background color should be transparent. This is default | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
HEX တန်ဖိုးဖြင့် နောက်ခံအရောင်ကို သတ်မှတ်ပါ-
body {background-color: #92a8d1;}
ဥပမာ
နောက်ခံအရောင်ကို RGB တန်ဖိုးဖြင့် သတ်မှတ်ပါ-
body {background-color: rgb(201, 76, 76);}
ဥပမာ
နောက်ခံအရောင်ကို RGBA တန်ဖိုးဖြင့် သတ်မှတ်ပါ-
body {background-color: rgba(201, 76, 76, 0.3);}
ဥပမာ
HSL တန်ဖိုးဖြင့် နောက်ခံအရောင်ကို သတ်မှတ်ပါ-
body {background-color: hsl(89, 43%, 51%);}
ဥပမာ
HSLA တန်ဖိုးဖြင့် နောက်ခံအရောင်ကို သတ်မှတ်ပါ-
body {background-color: hsla(89, 43%, 51%, 0.3);}
ဥပမာ
မတူညီသောဒြပ်စင်များအတွက် နောက်ခံအရောင်များကို သတ်မှတ်ပါ-
body {
background-color: #fefbd8;
}
h1 {
background-color: #80ced6;
}
div {
background-color: #d5f4e6;
}
span {
background-color: #f18973;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ
HTML DOM ရည်ညွှန်းချက်- နောက်ခံအရောင် ပိုင်ဆိုင်မှု