CSS နောက်ခံ- Property ကို ပြန်လုပ်ပါ။
ဥပမာ
နောက်ခံ-ပုံကို ဒေါင်လိုက်သာ ပြန်လုပ်ပါ-
body
{
background-image: url("paper.gif");
background-repeat: repeat-y;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
background-repeat
နောက်ခံပုံတစ်ပုံကို ထပ်ခါတလဲလဲလုပ်မည်လား/မည်ကဲ့သို့ သတ်မှတ်ပေးသည် ။
ပုံမှန်အားဖြင့်၊ နောက်ခံပုံတစ်ပုံ ကို ဒေါင်လိုက်နှင့် အလျားလိုက် နှစ်ခုလုံး ထပ်ခါတလဲလဲ ပြုလုပ်သည်။
အကြံပြုချက်- နောက်ခံပုံအား နောက်ခံအနေအထား ပိုင်ဆိုင်မှု အလိုက် နေရာချထားသည် ။ နောက်ခံအနေအထားကို မသတ်မှတ်ထားပါက၊ ရုပ်ပုံအား ဒြပ်စင်၏ ဘယ်ဘက်အပေါ်ထောင့်တွင် အမြဲထားရှိသည်။
မူလတန်ဖိုး: | ထပ်လုပ်ပါ။ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS1 |
JavaScript syntax- | အရာဝတ္ထု .style.backgroundRepeat="repeat-x" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
background-repeat | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
မှတ်ချက်- IE8 နှင့် အစောပိုင်းတွင် ဒြပ်စင်တစ်ခုရှိ နောက်ခံပုံအများအပြားကို မပံ့ပိုးပါ။
CSS Syntax
background-repeat: repeat|repeat-x|repeat-y|no-repeat|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
repeat | The background image is repeated both vertically and horizontally. The last image will be clipped if it does not fit. This is default | |
repeat-x | The background image is repeated only horizontally | |
repeat-y | The background image is repeated only vertically | |
no-repeat | The background-image is not repeated. The image will only be shown once | |
space | The background-image is repeated as much as possible without clipping. The first and last image is pinned to either side of the element, and whitespace is distributed evenly between the images | |
round | The background-image is repeated and squished or stretched to fill the space (no gaps) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
ဒေါင်လိုက်နှင့် အလျားလိုက် နောက်ခံပုံတစ်ပုံကို ပြန်လုပ်ပါ (၎င်းသည် မူရင်းဖြစ်သည်-
body
{
background-image: url("paper.gif");
background-repeat: repeat;
}
ဥပမာ
နောက်ခံပုံတစ်ပုံကို အလျားလိုက်သာ ပြန်လုပ်ပါ-
body
{
background-image: url("paper.gif");
background-repeat: repeat-x;
}
ဥပမာ
နောက်ခံပုံတစ်ပုံကို ထပ်မလုပ်ပါနှင့်။ ပုံကို တစ်ကြိမ်သာ ပြသပါမည်-
body
{
background-image: url("paper.gif");
background-repeat: no-repeat;
}
ဥပမာ
နောက်ခံ-ထပ်ကျော့-နေရာလွတ်နှင့် နောက်ခံ-ထပ်ကျော့-အဝိုင်းကို အသုံးပြုခြင်း-
#example2 {
border: 2px solid black;
padding: 25px;
background: url("w3css.gif");
background-repeat: space;
}
#example3 {
border: 1px solid black;
padding: 25px;
background: url("w3css.gif");
background-repeat: round;
}
ဥပမာ
"သူရဲကောင်း" ရုပ်ပုံဖန်တီးရန် မတူညီသော နောက်ခံဂုဏ်သတ္တိများကို အသုံးပြုပါ-
.hero-image {
background-image: url("photographer.jpg"); /* The
image used */
background-color: #cccccc; /* Used if the image is
unavailable */
height: 500px; /* You must set a specified height */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ
CSS ရည်ညွှန်းချက်- နောက်ခံအနေအထား ပိုင်ဆိုင်မှု
HTML DOM ရည်ညွှန်းချက်- နောက်ခံအထပ်ထပ် ပိုင်ဆိုင်မှု