有没有一个可以使用的包来自动添加额外的颜色,而不是默认的包?
默认颜色是(标签示例):
<span class="label">Default</span> <span class="label label-success">Success</span> <span class="label label-warning">Warning</span> <span class="label label-important">Important</span> <span class="label label-info">Info</span> <span class="label label-inverse">Inverse</span>
解决方法@H_301_8@
您可以使用这种CSS快速方便地为标签设置自己的颜色集:
.label-default {
background-color: #999;
}
.label-default[href]:hover,.label-default[href]:focus {
background-color: #808080;
}
.label-primary {
background-color: #428bca;
}
.label-primary[href]:hover,.label-primary[href]:focus {
background-color: #3071a9;
}
.label-success {
background-color: #5cb85c;
}
.label-success[href]:hover,.label-success[href]:focus {
background-color: #449d44;
}
.label-info {
background-color: #5bc0de;
}
.label-info[href]:hover,.label-info[href]:focus {
background-color: #31b0d5;
}
.label-warning {
background-color: #f0ad4e;
}
.label-warning[href]:hover,.label-warning[href]:focus {
background-color: #ec971f;
}
.label-danger {
background-color: #d9534f;
}
.label-danger[href]:hover,.label-danger[href]:focus {
background-color: #c9302c;
}
这里有2套:
>默认值:#95a5a6 /#7f8c8d
> primary:#3498db /#2980b9
>成功:#2ecc71 /#27ae60
> info:#9b59b6 /#8e44ad
>警告:#e67e22 /#d35400
危险:#e74c3c /#c0392b
>默认值:#95a5a6 /#7f8c8d
> primary:#00A388 /#007D68
>成功:#79BD8F /#659E78
>信息:#BEEB9F /#A5CC8A
>警告:#FFFF9D /#D1D181
危险:#FF6138 /#D6512F
.label-default { background-color: #999; } .label-default[href]:hover,.label-default[href]:focus { background-color: #808080; } .label-primary { background-color: #428bca; } .label-primary[href]:hover,.label-primary[href]:focus { background-color: #3071a9; } .label-success { background-color: #5cb85c; } .label-success[href]:hover,.label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover,.label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover,.label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover,.label-danger[href]:focus { background-color: #c9302c; }
这里有2套:
>默认值:#95a5a6 /#7f8c8d
> primary:#3498db /#2980b9
>成功:#2ecc71 /#27ae60
> info:#9b59b6 /#8e44ad
>警告:#e67e22 /#d35400
危险:#e74c3c /#c0392b
>默认值:#95a5a6 /#7f8c8d
> primary:#00A388 /#007D68
>成功:#79BD8F /#659E78
>信息:#BEEB9F /#A5CC8A
>警告:#FFFF9D /#D1D181
危险:#FF6138 /#D6512F