flex-flow ဂုဏ်သတ္တိ

flex-flow ဂုဏ်သတ္တိသည် flex-direction နှင့် flex-wrap တို့အတွက် အတိုကောက်ဖြစ်သည်။ စံထားရာတန်ဖိုး: row nowrap။ flex ဘလောက်များအတွက် မိဘအစိတ်အပိုင်းသို့ သက်ရောက်သည်။

ဝါကျဖွဲ့ပုံ

cssရွေးချယ်သူ {
  flex-flow: ပင်မဝင်ရိုး_ဦးတည်ချက် မျိုးစုံလိုင်း;
}

တန်ဖိုး၏ အစဉ်အလာသည် အရေးမကြီးပါ။

နမူနာ

ဤနမူနာတွင် ဘလောက်များသည် ၎င်းတို့၏ ကွန်တိန်နာထဲသို့ မဝင်ဆံ့ပါ နှင့် မျိုးစုံလိုင်းများတွင် စီတန်းသွားမည်:

html<div id="parent">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
  <div>9</div>
</div>
css#parent {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  border: 1px solid #696989;
  height: 200px;
  width: 330px;
  margin: auto;
}
#parent > div {
  width: 100px;
  height: 50px;
  border: 1px solid #696989;
}

Результат:

နမူနာ

ပင်မဝင်ရိုး၏ ဦးတည်ချက်ကို ပြောင်းလဲမည် (row အစား column):

html<div id="parent">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
  <div>9</div>
</div>
css#parent {
  flex-flow: column wrap;
  justify-content: space-between;
  display: flex;
  height: 200px;
  width: 330px;
  margin: auto;
  border: 1px solid #696989;
}
#parent > div {
  width: 100px;
  height: 50px;
  border: 1px solid #696989;
}

Результат:

ဆက်လက်ကြည့်ရှုရန်

  • flex-direction ဂုဏ်သတ္တိ,
    သည် flex ဘလောက်များ၏ ဝင်ရိုးများ၏ ဦးတည်ချက်ကို သတ်မှတ်ပေးသည်
  • justify-content ဂုဏ်သတ္တိ,
    သည် ပင်မဝင်ရိုးတလျှောက် ညှိယူခြင်းကို သတ်မှတ်ပေးသည်
  • align-items ဂုဏ်သတ္တိ,
    သည် ဖြတ်ဝင်ရိုးတလျှောက် ညှိယူခြင်းကို သတ်မှတ်ပေးသည်
  • flex-wrap ဂုဏ်သတ္တိ,
    သည် flex ဘလောက်များ၏ မျိုးစုံလိုင်းမှုကို သတ်မှတ်ပေးသည်
  • order ဂုဏ်သတ္တိ,
    သည် flex ဘလောက်များ၏ အစဉ်အလာကို သတ်မှတ်ပေးသည်
  • align-self ဂုဏ်သတ္တိ,
    သည် တစ်ခုတည်းသော ဘလောက်၏ ညှိယူခြင်းကို သတ်မှတ်ပေးသည်
  • flex-basis ဂုဏ်သတ္တိ,
    သည် တိကျသော flex ဘလောက်၏ အရွယ်အစားကို သတ်မှတ်ပေးသည်
  • flex-grow ဂုဏ်သတ္တိ,
    သည် flex ဘလောက်များ၏ လောဘကို သတ်မှတ်ပေးသည်
  • flex-shrink ဂုဏ်သတ္တိ,
    သည် flex ဘလောက်များ၏ ကျုံ့နိုင်မှုကို သတ်မှတ်ပေးသည်
  • flex ဂုဏ်သတ္တိ,
    flex-grow, flex-shrink နှင့် flex-basis တို့အတွက် အတိုကောက်