CSS grid-template-columns ပိုင်ဆိုင်မှု
ဥပမာ
ကော်လံ 4 ခု ဇယားကွက်တစ်ခု ပြုလုပ်ပါ-
.grid-container {
display: grid;
grid-template-columns:
auto auto auto auto;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
grid-template-columns
ပိုင်ဆိုင်မှုသည် ဇယားကွက်အပြင်အဆင်ရှိ ကော်လံများ၏ နံပါတ် (နှင့် အကျယ်) ကို သတ်မှတ်ပေးသည် ။
တန်ဖိုးများသည် သက်ဆိုင်ရာ ကော်လံ၏ အရွယ်အစားကို သတ်မှတ်ပေးသည့် တန်ဖိုးတစ်ခုစီမှ နေရာလွတ်များ ခြားထားသော စာရင်းတစ်ခု ဖြစ်သည်။
မူလတန်ဖိုး: | မရှိ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်တယ် ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS Grid Layout Module အဆင့် ၁ |
JavaScript syntax- | အရာဝတ္ထု .style.gridTemplateColumns="50px 50px 50px" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
grid-template-columns | 57 | 16 | 52 | 10 | 44 |
CSS Syntax
grid-template-columns: none|auto|max-content|min-content|length|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
none | Default value. Columns are created if needed | |
auto | The size of the columns is determined by the size of the container and on the size of the content of the items in the column | |
max-content | Sets the size of each column to depend on the largest item in the column | |
min-content | Sets the size of each column to depend on the smallest item in the column | |
length | Sets the size of the columns, by using a legal length value. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
ကော်လံ 4 ခုကို ဇယားကွက်တစ်ခုပြုလုပ်ပြီး ကော်လံတစ်ခုစီအတွက် အရွယ်အစားကို သတ်မှတ်ပါ-
.grid-container {
display: grid;
grid-template-columns:
30px 200px auto 100px;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS Grid Layout
CSS ရည်ညွှန်းချက်- grid-template-rows ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- ဇယားကွက်ပုံစံ ပိုင်ဆိုင်မှု