7.6. Bootstrap5 Color

发布时间 : 2025-10-25 13:35:31 UTC      

Page Views: 10 views

Bootstrap 5 provides some representative color classes: .text-muted , .text-primary , .text-success , .text-info , .text-warning , .text-danger , .text- secondary , .text-white , .text-dark , .text-body (Default color, black) and .text-light :

7.6.1. Example

<div class="container"> <h2>Text color representing the specified meaningh2> <p class="text-muted">Soft text.p> <p class="text-primary">Important text.p> <p class="text-success">The text of successful execution.p> <p class="text-info">Text representing some prompt information.p> <p class="text-warning">Warning text.p> <p class="text-danger">Dangerous operation text.p> <p class="text-secondary">Subtitle.p> <p class="text-dark">Dark gray text.p> <p class="text-body">The default color is black.p> <p class="text-light">Light gray text (unclear on a white background).p> <p class="text-white">White text (unclear on a white background).p> div>    

You can set the text color transparency to 50%, using the .text-black-50 or .text-white-50 class:

7.6.2. Example

<p class="text-black-50">Black text with a transparency of 50% and a background of white.p> <p class="text-white-50 bg-dark">White text with a transparency of 50% and a black background.p>    

Use in links

7.6.3. Example

<div class="container"> <h2>text colorh2> <p>Move the mouse to the link.p> <a href="#" class="text-muted">Soft links.a> <a href="#" class="text-primary">Main link.a> <a href="#" class="text-success">Successfully linked.a> <a href="#" class="text-info">Information text link.a> <a href="#" class="text-warning">Warning link.a> <a href="#" class="text-danger">Dangerous links.a> <a href="#" class="text-secondary">Subtitle link.a> <a href="#" class="text-dark">Dark gray links.a> <a href="#" class="text-light">Light gray links.a> div>    

Background color

The classes that provide background colors include: .bg-primary , .bg-success , .bg-info , .bg- warning , .bg-danger , .bg-secondary , .bg-dark and .bg-light

Note that the background color does not set the color of the text, and in some cases you need to match the .text-\* class is used together.

7.6.4. Example

Background

Important background colors。

Successfully executed background color.

Information prompt background color.

Warning background color

Dangerous background color.

Subtitle background color.

Dark gray background color.

Light gray background color.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。