AdminLTE 背景色小结

文本背景色boxbtnmodallabelalertcallout
.text-blue.bg-light-blue.box-primary.btn-primary.modal-primary.label-primary
.text-aqua.bg-aqua.box-info.btn-info.modal-info.label-info.alert-info.callout-info
.text-green.bg-green.box-success.btn-success.modal-success.label-success.alert-success.callout-success
.text-yellow.bg-yellow.box-warning.btn-warning.modal-warning.label-warning.alert-warning.callout-warning
.text-red.bg-red.box-danger.btn-danger.modal-danger.label-danger.alert-danger,
.alert-error
.callout-danger
.text-navy.bg-navy
.text-teal.bg-teal
.text-purple.bg-purple
.text-orange.bg-orange
.text-maroon.bg-maroon
.text-black.bg-black

1. 背景色相关类用于设置的div,span,small,p等元素的背景色。

2. 背景色应用于特定的标签时,会有一个更加具体的类名,这个类名有更明确的语意。如

<button class="btn btn-primary">按钮1</button>
<button class="btn bg-light-blue">按钮2</button>

“按钮1”和“按钮2”效果基本相同。

3. 尽量使用更具体的类名,因为bg-*的效果要比具体类名更宽泛。

<div class="box box-success box-solid">
    //box1
</div>
<div class="box bg-green box-solid">
    //box2
</div>

“box1”和”box2” 的效果不同,主要体现在box-header中。

4. 文本相关类可用于设置文本颜色,也可用于设置小图标。如

<p class="text-green text-center">绿色文本</p>
<i class="fa fa-circle-o text-red"></i>//红色图标

5. 背景色还添加.disabled类,得到颜色更浅的背景色,相应的有.bg-*-active,是颜色更深的背景色。

<div class="bg-red disabled color-palette"><span>Disabled</span></div>
<div class="bg-red color-palette"><span>#f56954</span></div>
<div class="bg-red-active color-palette"><span>Active</span></div>
  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值