codecamp

概览

AUI目前只做针对apicloud的css,帮助开发者快速完成app布局,采用响应式布局兼容不同尺寸的手机端。完整版体积在30k左右,压缩之后20k左右,用最少的代码完成app的布局,同时方便用户自定义和扩展。aui.cssaui_iconfont.ttf请保存到apicloud的css目录下。aui所有的样式均有aui-前缀。

在布局app样式时,为了确保绘制和缩放的效果需要在<head>标签中添加 viewport 元数据标签

<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>

同时添加format-detection,防止ios机型将连续数组转为手机号码

<meta name="format-detection" content="telephone=no"/>

加载上aui.css样式表,享受编程之美。
<link rel="stylesheet" type="text/css" href="../css/aui.css" />

AUI说明
下载
温馨提示
下载编程狮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; }