codecamp

标签

提供了几个默认色值的小标签效果,用户可以根据自己的需要来对颜色进行自由配置。.aui-label来定义标签,.aui-label-*为样式。默认的样式有以下:

.aui-label-default {background-color: #ecf0f1;color: #8f8f94;}
.aui-label-primary {background-color: #1abc9c;}
.aui-label-success {background-color: #2ecc71;}
.aui-label-info {background-color: #3498db;}
.aui-label-warning {background-color: #f1c40f;}
.aui-label-danger {background-color: #e74c3c;}
.aui-label-blue {background-color: #a1d4cf;}
.aui-label-pink {background-color: #fbb8af;}

<span class="aui-label aui-label-primary"></span>

自定义标签样式方法:

<style>
.orange { background-color:#ff9900; color:#ffffff}
</style>
<span class="aui-label orange">...</span>
文字样式
按钮
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }