Vertikal tekislash
Inline, inline-block, inline-jadval va jadval katakchalari elementlarining vertikal tekislanishini osongina o'zgartiring.
Utilitlar bilan elementlarning hizalanishini o'zgartiring vertical-alignment
. E'tibor bering, vertikal tekislash faqat inline, inline-block, inline-jadval va jadval katakchalari elementlariga ta'sir qiladi.
.align-baseline
, .align-top
, .align-middle
, .align-bottom
, .align-text-bottom
va kerak bo'lganda tanlang .align-text-top
.
Inline bo'lmagan kontentni (masalan, <div>
s va boshqalar) vertikal markazlashtirish uchun bizning flex box utilitalarimizdan foydalaning .
Inline elementlar bilan:
<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>
Jadval hujayralari bilan:
asosiy chiziq | yuqori | o'rtada | pastki | matn tepasi | matn-pastki |
<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
Utilities API
Vertical align yordamchi dasturlari bizning API-da e'lon qilingan scss/_utilities.scss
. API yordam dasturlarini qanday ishlatishni bilib oling.
"align": (
property: vertical-align,
class: align,
values: baseline top middle bottom text-bottom text-top
),