Background Color Classes


Similar to the contextual color classes, you can use the contextual background color classes to set the background-color of an element to apply extra emphasis on them.

ClassDescriptionTest
.bg-primaryApply blue background-color (#007bff) on an element.Example
.bg-secondaryApply grey background-color (#6c757d) on an element.Example
.bg-successApply green background-color (#28a745) on an element.Example
.bg-dangerApply red background-color (#dc3545) on an element.Example
.bg-warningApply yellow background-color (#ffc107) on an element.Example
.bg-infoApply teal background-color (#17a2b8) on an element.Example
.bg-lightApply very light grey background-color (#f8f9fa) on an element.Example
.bg-darkApply dark grey background-color (#343a40) on an element.Example
.bg-whiteApply white background-color (#fff) on an element.Example
.bg-transparentApply transparent background-color (transparent) on an element.Example

Leave a Reply

Your email address will not be published. Required fields are marked *