പ്രധാന ഉള്ളടക്കത്തിലേക്ക് പോകുക ഡോക്സ് നാവിഗേഷനിലേക്ക് പോകുക
Check
in English

നിറവും പശ്ചാത്തലവും

കോൺട്രാസ്റ്റിംഗ് ഫോർഗ്രൗണ്ട് വർണ്ണം ഉപയോഗിച്ച് പശ്ചാത്തല വർണ്ണം സജ്ജമാക്കുക.

അവലോകനം

v5.2.0 ൽ ചേർത്തു

വർണ്ണവും പശ്ചാത്തല സഹായികളും ഒരു ക്ലാസിലെ ഞങ്ങളുടെ യൂട്ടിലിറ്റികളുടെയും യൂട്ടിലിറ്റികളുടെയും .text-*ശക്തി .bg-*സംയോജിപ്പിക്കുന്നു . ഞങ്ങളുടെ Sass ഫംഗ്‌ഷൻ ഉപയോഗിച്ച് , ഒരു നിർദ്ദിഷ്‌ടത്തിനായുള്ള color-contrast()വൈരുദ്ധ്യം ഞങ്ങൾ യാന്ത്രികമായി നിർണ്ണയിക്കുന്നു .colorbackground-color

ഹെഡ്സ് അപ്പുകൾ! ഒരു CSS-നേറ്റീവ് ഫംഗ്‌ഷന് നിലവിൽ പിന്തുണയൊന്നുമില്ല color-contrast, അതിനാൽ ഞങ്ങൾ ഞങ്ങളുടെ സ്വന്തമായത് Sass വഴി ഉപയോഗിക്കുന്നു. CSS വേരിയബിളുകൾ വഴി ഞങ്ങളുടെ തീം വർണ്ണങ്ങൾ ഇഷ്‌ടാനുസൃതമാക്കുന്നത് ഈ യൂട്ടിലിറ്റികളിൽ വർണ്ണ കോൺട്രാസ്റ്റ് പ്രശ്‌നങ്ങൾക്ക് കാരണമായേക്കാം എന്നാണ് ഇതിനർത്ഥം.
വൈരുദ്ധ്യമുള്ള നിറമുള്ള പ്രാഥമികം
വ്യത്യസ്‌ത നിറമുള്ള ദ്വിതീയ
വ്യത്യസ്‌ത വർണ്ണത്തോടുകൂടിയ വിജയം
വ്യത്യസ്‌ത നിറമുള്ള അപകടം
വിപരീത വർണ്ണത്തോടുകൂടിയ മുന്നറിയിപ്പ്
വ്യത്യസ്‌ത നിറങ്ങളുള്ള വിവരങ്ങൾ
വ്യത്യസ്ത നിറങ്ങളുള്ള പ്രകാശം
വ്യത്യസ്‌ത നിറമുള്ള ഇരുണ്ട
html
<div class="text-bg-primary p-3">Primary with contrasting color</div>
<div class="text-bg-secondary p-3">Secondary with contrasting color</div>
<div class="text-bg-success p-3">Success with contrasting color</div>
<div class="text-bg-danger p-3">Danger with contrasting color</div>
<div class="text-bg-warning p-3">Warning with contrasting color</div>
<div class="text-bg-info p-3">Info with contrasting color</div>
<div class="text-bg-light p-3">Light with contrasting color</div>
<div class="text-bg-dark p-3">Dark with contrasting color</div>

ഘടകങ്ങൾ ഉപയോഗിച്ച്

ബാഡ്‌ജുകൾ പോലെ , സംയോജിത .text-*, ക്ലാസുകളുടെ സ്ഥാനത്ത് അവ ഉപയോഗിക്കുക :.bg-*

പ്രാഥമികം വിവരം
html
<span class="badge text-bg-primary">Primary</span>
<span class="badge text-bg-info">Info</span>

അല്ലെങ്കിൽ കാർഡുകളിൽ :

തലക്കെട്ട്

കാർഡ് ശീർഷകത്തിൽ നിർമ്മിക്കാനും കാർഡിന്റെ ഉള്ളടക്കത്തിന്റെ ഭൂരിഭാഗവും ഉണ്ടാക്കാനുമുള്ള ചില ദ്രുത ഉദാഹരണ വാചകം.

തലക്കെട്ട്

കാർഡ് ശീർഷകത്തിൽ നിർമ്മിക്കാനും കാർഡിന്റെ ഉള്ളടക്കത്തിന്റെ ഭൂരിഭാഗവും ഉണ്ടാക്കാനുമുള്ള ചില ദ്രുത ഉദാഹരണ വാചകം.

html
<div class="card text-bg-primary mb-3" style="max-width: 18rem;">
  <div class="card-header">Header</div>
  <div class="card-body">
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
  </div>
</div>
<div class="card text-bg-info mb-3" style="max-width: 18rem;">
  <div class="card-header">Header</div>
  <div class="card-body">
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
  </div>
</div>