ブートストラップ4色


テキストの色

Bootstrap 4には、「色による意味」を提供するために使用できるコンテキストクラスがいくつかあります。

テキストの色のクラスは次のとおりです。、、、、、、、、、、、デフォルト.text-mutedボディ カラー/ 多く場合黒)および.text-primary.text-success.text-info.text-warning.text-danger.text-secondary.text-white.text-dark.text-body.text-light

This text is muted.

This text is important.

This text indicates success.

This text represents some information.

This text represents a warning.

This text represents danger.

Secondary text.

Dark grey text.

Body text.

Light grey text.

リンクではコンテキストテキストクラスを使用することもできます。これにより、ホバーの色が暗くなります。

.text-black-50または.text-white-50クラスを使用して、黒または白のテキストに50%の不透明度を追加することもできます。

Black text with 50% opacity on white background

White text with 50% opacity on black background


背景色

背景.bg-primaryクラス .bg-success、、、、、、、、、および.bg-infoです.bg-warning.bg-danger.bg-secondary.bg-dark.bg-light

.text-*背景色はテキストの色を設定しないため、クラスと一緒に使用したい場合があることに注意してください。

This text is important.

This text indicates success.

This text represents some information.

This text represents a warning.

This text represents danger.

Secondary background color.

Dark grey background color.

Light grey background color.