CSS ဇယားကွက် ပိုင်ဆိုင်မှု
ဥပမာ
ပထမတန်းသည် 150px မြင့်သည့် ကော်လံသုံးခုကို ဇယားကွက်ပုံစံပြုလုပ်ပါ-
.grid-container {
display: grid;
grid: 150px
/ auto auto auto;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှုသည် အောက်ပါ grid
တို့အတွက် အတိုကောက်ပိုင်ဆိုင်မှုတစ်ခုဖြစ်သည်။
- grid-template-rows
- grid-template-columns
- ဇယားကွက်-ပုံစံ-ဧရိယာ
- grid-auto-rows
- grid-auto-columns
- grid-auto-flow
မူလတန်ဖိုး: | none none none auto auto အတန်း |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်ကဲ့၊ တစ်ဦးချင်းဂုဏ်သတ္တိများကိုကြည့်ပါ ။ ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS Grid Layout Module အဆင့် ၁ |
JavaScript syntax- | အရာဝတ္ထု .style.grid="250px / အော်တို အော်တို အော်တို" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
grid | 57 | 16 | 52 | 10 | 44 |
CSS Syntax
grid: none|grid-template-rows /
grid-template-columns|grid-template-areas|grid-template-rows
/ [grid-auto-flow] grid-auto-columns|[grid-auto-flow] grid-auto-rows / grid-template-columns|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
none | Default value. No specific sizing of the columns or rows | |
grid-template-rows / grid-template-columns | Specifies the size(s) of the columns and rows | |
grid-template-areas | Specifies the grid layout using named items | |
grid-template-rows / grid-auto-columns | Specifies the size (height) of the rows, and the auto size of the columns | |
grid-auto-rows / grid-template-columns | Specifies the auto size of the rows, and sets the grid-template-columns property | |
grid-template-rows / grid-auto-flow grid-auto-columns | Specifies the size (height) of the rows, and how to place auto-placed items, and the auto size of the columns | |
grid-auto-flow grid-auto-rows / grid-template-columns | Specifies how to place auto-placed items, and the auto size of the rows, and sets the grid-template-columns property | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
"item1" သည် ပထမတန်းနှစ်တန်းရှိ ပထမကော်လံနှစ်ခုကို ဖြန့်ကြက်ထားသည့် အတန်းနှစ်တန်းကို သတ်မှတ်ပါ (ကော်လံငါးခုဇယားကွက်ပုံစံတွင်):
.item1 {
grid-area: myArea;
}
.grid-container {
display: grid;
grid:
'myArea myArea . . .'
'myArea myArea . . .';
}
ဥပမာ
ပစ္စည်းအားလုံးကို အမည်ပေးပြီး အဆင်သင့်သုံးနိုင်သော ဝဘ်စာမျက်နှာ နမူနာတစ်ခု ပြုလုပ်ပါ-
.item1 { grid-area: header; }
.item2 { grid-area:
menu; }
.item3 { grid-area:
main; }
.item4 { grid-area:
right; }
.item5 { grid-area:
footer; }
.grid-container {
display: grid;
grid:
'header header header header header'
'menu main main main right right'
'menu footer footer
footer footer';
}
ဆက်စပ်စာမျက်နှာများ
CSS ကျူတိုရီရယ်- CSS Grid ကွန်တိန်နာ
CSS ရည်ညွှန်းချက်- grid-template-areas ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-template-rows ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-template-columns ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-auto-rows ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-auto-columns ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-auto-flow ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-row-gap ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- grid-column-gap ပိုင်ဆိုင်မှု