بخش ۵: رنگ‌ها (Colors)

بخش ۵: رنگ‌ها (Colors)

رنگ‌های متن

کلاس‌های رنگی زیر را می‌توان به هر متنی اعمال کرد تا معنای خاصی را برسانند.

<p class=”text-primary”>Primary text</p>

<p class=”text-success”>Success text</p>

<p class=”text-info”>Info text</p>

<p class=”text-warning”>Warning text</p>

<p class=”text-danger”>Danger text</p>

<p class=”text-secondary”>Secondary text</p>

خروجی بصری:

Primary text

Success text

Info text

Warning text

Danger text

رنگ‌های پس‌زمینه (Backgrounds)

کلاس‌های .bg-* برای تغییر رنگ پس‌زمینه عناصر استفاده می‌شوند.

<div class=”bg-primary text-white p-3″>Primary background</div>

<div class=”bg-success text-white p-3″>Success background</div>

<div class=”bg-warning text-dark p-3″>Warning background</div>

خروجی بصری:

Primary background
Success background
Warning background

شفافیت (Opacity)

از کلاس .text-opacity-* و .bg-opacity-* برای تنظیم غلظت رنگ (۲۵، ۵۰، ۷۵) استفاده می‌شود.

<div class=”bg-success bg-opacity-50 p-2″>50% Opacity Background</div>

<p class=”text-danger text-opacity-25″>25% Opacity Text</p>