Source

Matn

Hizalashni, o'rashni, vaznini va boshqalarni boshqarish uchun umumiy matn yordam dasturlari uchun hujjatlar va misollar.

Matnni tekislash

Matnni tekislash sinflari bilan matnni komponentlarga osongina moslashtiring.

Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. Nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.

<p class="text-justify">Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. At nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.</p>

Chapga, o'ngga va markazga tekislash uchun, panjara tizimi bilan bir xil ko'rish maydoni kengligi to'xtash nuqtalaridan foydalanadigan sezgir sinflar mavjud.

Ko'rish oynasining barcha o'lchamlarida chapga tekislangan matn.

Barcha ko'rish oynasi o'lchamlari bo'yicha markazlashtirilgan matn.

Ko'rish oynasining barcha o'lchamlarida o'ngga tekislangan matn.

SM (kichik) yoki kengroq o'lchamdagi ko'rish oynalarida chapga tekislangan matn.

MD (o'rta) yoki kengroq o'lchamdagi ko'rish oynalarida chapga tekislangan matn.

LG (katta) yoki kengroq o'lchamdagi ko'rish oynalarida chapga tekislangan matn.

XL (o'ta katta) yoki kengroq o'lchamdagi ko'rish oynalarida chapga tekislangan matn.

<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
<p class="text-right">Right aligned text on all viewport sizes.</p>

<p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>

Matnni o‘rash va to‘ldirish

Matnni .text-wrapsinf bilan oʻrash.

Ushbu matnni o'rash kerak.
<div class="badge badge-primary text-wrap" style="width: 6rem;">
  This text should wrap.
</div>

.text-nowrapMatnni sinf bilan o'rashni oldini olish .

Ushbu matn ota-onani to'ldirishi kerak.
<div class="text-nowrap bd-highlight" style="width: 8rem;">
  This text should overflow the parent.
</div>

Uzunroq tarkib uchun siz .text-truncatematnni ellips bilan kesish uchun sinf qo'shishingiz mumkin. Talab qiladi display: inline-blockyoki display: block.

Praeterea iter est quasdam res quas ex communi.
Praeterea iter est quasdam res quas ex communi.
<!-- Block level -->
<div class="row">
  <div class="col-2 text-truncate">
    Praeterea iter est quasdam res quas ex communi.
  </div>
</div>

<!-- Inline level -->
<span class="d-inline-block text-truncate" style="max-width: 150px;">
  Praeterea iter est quasdam res quas ex communi.
</span>

So'z uzilishi

.text-breakO'rnatish uchun overflow-wrap: break-word(va word-break: break-wordIE va Edge mosligi uchun) dan foydalanib, uzun matn qatorlarini komponentlaringiz tartibini buzishining oldini oling .

mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>

Matnni o'zgartirish

Matnni bosh harflar sinflari bilan komponentlarga aylantiring.

Kichik harfli matn.

Katta harfli matn.

Katta harfli matn.

<p class="text-lowercase">Lowercased text.</p>
<p class="text-uppercase">Uppercased text.</p>
<p class="text-capitalize">CapiTaliZed text.</p>

.text-capitalizeQanday qilib har bir so'zning birinchi harfini o'zgartirganiga e'tibor bering , boshqa harflarning holatiga ta'sir qilmaydi.

Shrift og'irligi va kursiv

Matnning og'irligini (qalinligini) tezda o'zgartiring yoki matnni kursiv qiling.

Qalin matn.

Qalinroq vaznli matn (ota elementga nisbatan).

Oddiy vaznli matn.

Engil vaznli matn.

Engilroq matn (ota elementga nisbatan).

Kursiv matn.

<p class="font-weight-bold">Bold text.</p>
<p class="font-weight-bolder">Bolder weight text (relative to the parent element).</p>
<p class="font-weight-normal">Normal weight text.</p>
<p class="font-weight-light">Light weight text.</p>
<p class="font-weight-lighter">Lighter weight text (relative to the parent element).</p>
<p class="font-italic">Italic text.</p>

Bir fazo

Tanlovni bizning monospace shrift stekiga o'zgartiring .text-monospace.

Bu monofazoda

<p class="text-monospace">This is in monospace</p>

Rangni tiklash

Matn yoki havola rangini bilan .text-resetasliga qaytaring, shunda u rangni ota-onasidan meros qilib oladi.

Qayta tiklash havolasi bilan ovozsiz matn .

<p class="text-muted">
  Muted text with a <a href="#" class="text-reset">reset link</a>.
</p>

Matnni bezash

.text-decoration-noneSinf bilan matn bezaklarini olib tashlang .

<a href="#" class="text-decoration-none">Non-underlined link</a>