摘要: requirejs大致用法:通过定义模板define()再通过require()或requirejs()加载模板, paths是路径,如果路径长可以把它赋一个短名称加入ruquire()中,shim是兼容处理的,查看 index.html里面不需要其他引入js的script标签,除了这个 <scri 阅读全文
posted @ 2016-11-24 18:20 xuanPhoto 阅读(188) 评论(0) 推荐(0)
摘要: 通过require加载的模块一般都需要符合AMD规范即使用define来申明模块, 但是部分时候需要加载非AMD规范的js,这时候就需要用到另一个功能:shim,shim解释起来也比较难理解,shim直接翻译为"垫", 其实也是有这层意思的,目前我主要用在两个地方 非AMD模块输出,将非标准的AMD 阅读全文
posted @ 2016-11-24 17:07 xuanPhoto 阅读(359) 评论(0) 推荐(0)
摘要: meta:vp 快速生成 meta视口 阅读全文
posted @ 2016-11-23 21:12 xuanPhoto 阅读(353) 评论(0) 推荐(0)
摘要: li:not(:last-child){border-right: 1px dashed black;} 选择全部排除最后一项 li:not(:first-child) { }选择全部排除第一项 li:last-of-type{background-color: red;} 选择li中最后一项 li 阅读全文
posted @ 2016-11-23 21:09 xuanPhoto 阅读(177) 评论(0) 推荐(0)
摘要: ::-webkit-input-placeholder{ font-size:px2rem(36); } ::-webkit-input-placeholder{ font-size:px2rem(36); } 阅读全文
posted @ 2016-11-23 21:05 xuanPhoto 阅读(326) 评论(0) 推荐(0)
摘要: 字体设置由来对应说明 阅读全文
posted @ 2016-11-23 21:03 xuanPhoto 阅读(220) 评论(0) 推荐(0)
摘要: 超出一行用...代替 text-overflow:ellipsis ; white-space:nowrap ; overflow:hidden; 超出多行用...代替 这里以10行来展现效果(兼容苹果) .multilineellipsis { width: 100%; overflow: hid 阅读全文
posted @ 2016-11-23 20:59 xuanPhoto 阅读(173) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-11-23 20:58 xuanPhoto 阅读(234) 评论(0) 推荐(0)
摘要: @charset "utf-8"; /* 禁用iPhone中Safari的字号自动调整 */ html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-touch-callout: none; /* iOS 阅读全文
posted @ 2016-11-23 20:56 xuanPhoto 阅读(416) 评论(0) 推荐(0)
摘要: 在页面 alert(JSON);//大写 IE7及以下浏览器不支持json所以不会弹出object 解决方法打开json.org json的官网找到javascript的json2.js然后会转到github上,找到文件名为json2.js,点击进入然后复制下来, 在本地新建一个js的文件,然后粘贴 阅读全文
posted @ 2016-11-22 11:01 xuanPhoto 阅读(492) 评论(0) 推荐(0)