Mafere na isi ọdịnaya Gaa na ntugharị docs
Check
in English

Nchịkọta

Ndị enyemaka Shorthand na-ewu n'elu akụrụngwa flexbox anyị iji mee nhazi akụrụngwa ngwa ngwa na dị mfe karịa mgbe ọ bụla.

Na ibe a

Stacks na-enye ụzọ mkpirisi maka itinye ọtụtụ akụrụngwa flexbox iji mepụta nhazi ngwa ngwa na ngwa ngwa na Bootstrap. Ekele niile maka echiche na mmejuputa a na-aga na ọrụ Pylon mepere emepe .

Welie isi elu! Agbakwunyere nkwado maka akụrụngwa nwere oghere nwere flexbox na Safari n'oge na-adịbeghị anya, yabụ tụlee ịkwado nkwado ihe nchọgharị ịchọrọ. Nhazi grid ekwesịghị inwe nsogbu. Gụkwuo .

kwụ ọtọ

Jiri .vstackmepụta okirikiri nhọrọ ukwuu. Ihe ndị ekpokọbara nwere obosara na ndabara. Jiri .gap-*akụrụngwa tinye ohere n'etiti ihe.

Ihe mbụ
Ihe nke abụọ
Ihe nke atọ
html
<div class="vstack gap-3">
  <div class="bg-light border">First item</div>
  <div class="bg-light border">Second item</div>
  <div class="bg-light border">Third item</div>
</div>

Kehoraizin

Jiri .hstackmaka okirikiri nhọrọ ukwuu. A na-adabere na ndabara n'etiti ihe ndị ekpokọtara ọnụ ma buru naanị obosara ha dị mkpa. Jiri .gap-*akụrụngwa tinye ohere n'etiti ihe.

Ihe mbụ
Ihe nke abụọ
Ihe nke atọ
html
<div class="hstack gap-3">
  <div class="bg-light border">First item</div>
  <div class="bg-light border">Second item</div>
  <div class="bg-light border">Third item</div>
</div>

Iji akụrụngwa oke kwụ ọtọ dị .ms-autoka spacers:

Ihe mbụ
Ihe nke abụọ
Ihe nke atọ
html
<div class="hstack gap-3">
  <div class="bg-light border">First item</div>
  <div class="bg-light border ms-auto">Second item</div>
  <div class="bg-light border">Third item</div>
</div>

Ya na iwu kwụ ọtọ :

Ihe mbụ
Ihe nke abụọ
Ihe nke atọ
html
<div class="hstack gap-3">
  <div class="bg-light border">First item</div>
  <div class="bg-light border ms-auto">Second item</div>
  <div class="vr"></div>
  <div class="bg-light border">Third item</div>
</div>

Ihe atụ

Jiri .vstackiji kpokọta bọtịnụ na ihe ndị ọzọ:

html
<div class="vstack gap-2 col-md-5 mx-auto">
  <button type="button" class="btn btn-secondary">Save changes</button>
  <button type="button" class="btn btn-outline-secondary">Cancel</button>
</div>

Mepụta fọm inline na .hstack:

html
<div class="hstack gap-3">
  <input class="form-control me-auto" type="text" placeholder="Add your item here..." aria-label="Add your item here...">
  <button type="button" class="btn btn-secondary">Submit</button>
  <div class="vr"></div>
  <button type="button" class="btn btn-outline-danger">Reset</button>
</div>

Sass

.hstack {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
}

.vstack {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-self: stretch;
}