有没有一个可以使用的包来自动添加额外的颜色,而不是默认的包?
<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>
解决方法
您可以使用这种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
原文地址:https://www.jb51.cc/css/216616.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。