স্কিপ করে মূল কন্টেন্ট এ যাও ডক্স নেভিগেশন এড়িয়ে যান
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>