Svetuka kune chikuru content Svetuka kuenda kudocs navigation
Check
in English

Vertical alignment

Shandura zviri nyore kurongeka kweiyo inline, inline-block, inline-tafura, uye tafura cell zvinhu.

Shandura kurongeka kwezvinhu vertical-alignmentnezvishandiso. Ndapota cherechedza kuti vertical-align inongobata inline, inline-block, inline-table, uye table cell elements.

Sarudza kubva .align-baseline, .align-top, .align-middle, .align-bottom, .align-text-bottom, uye .align-text-topsezvinodiwa.

Kuisa pakati nepakati zvisiri-inline zvemukati (senge <div>s nezvimwe), shandisa yedu flex box utilities .

Ne inline elements:

baseline pamusoro pepakati pazasi mavara-pamusoro mavara-pasi
html
<span class="align-baseline">baseline</span>
<span class="align-top">top</span>
<span class="align-middle">middle</span>
<span class="align-bottom">bottom</span>
<span class="align-text-top">text-top</span>
<span class="align-text-bottom">text-bottom</span>

Nemaseru etafura:

baseline pamusoro pakati pasi text-top zvinyorwa-pasi
html
<table style="height: 100px;">
  <tbody>
    <tr>
      <td class="align-baseline">baseline</td>
      <td class="align-top">top</td>
      <td class="align-middle">middle</td>
      <td class="align-bottom">bottom</td>
      <td class="align-text-top">text-top</td>
      <td class="align-text-bottom">text-bottom</td>
    </tr>
  </tbody>
</table>

Sass

Purogiramu inonzi Utilities

Vertical align utilities inoziviswa mune yedu zvishandiso API mu scss/_utilities.scss. Dzidza mashandisiro ezvishandiso API.

    "align": (
      property: vertical-align,
      class: align,
      values: baseline top middle bottom text-bottom text-top
    ),