in English

Vertical alignment

Yooj yim hloov txoj kab ntsug ntawm inline, inline-block, inline-table, thiab cov ntsiab lus ntawm tes.

Hloov cov kev sib raug zoo ntawm cov khoom siv nrog cov vertical-alignmentkhoom siv. Thov nco ntsoov tias ntsug-txhim kho tsuas yog cuam tshuam rau hauv kab, inline-block, inline-table, thiab cov ntsiab lus ntawm tes.

Xaiv los ntawm .align-baseline, .align-top, .align-middle, .align-bottom, .align-text-bottom, thiab .align-text-topraws li xav tau.

Nrog cov ntsiab lus inline:

lub hauv paus saum nruab nrab hauv qab ntawv-sab saum toj ntawv-hauv qab
<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>

Nrog lub rooj cell:

hauv paus saum nruab nrab hauv qab ntawv-top ntawv-hauv qab
<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>