.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-secondary, .bg-dark, and .bg-light are the classes for background colors.
Keep in mind that background colors do not change the text color, so you may wish to combine them with a .text-* class in some situations.
Text does not work well with the aforementioned .bg-color classes; at the very least, you need to specify a proper .text-color class in order to get the appropriate text color for each backdrop.
But if you use the .text-bg-color classes, Bootstrap will take care of choosing the right text color for each backdrop color for you:
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.