摘要: rem两个比较好的框架 淘宝Flexible https://github.com/amfe/lib-flexible 使用Flexible实现手淘H5页面的终端适配 https://github.com/amfe/article/issues/17 adaptive https://github. 阅读全文
posted @ 2015-05-14 17:09 surfaces 阅读(1209) 评论(0) 推荐(0)
摘要: tap事件 tap 事件相当于 pc 浏览器中的 click 效果,虽然在触屏设备上 click 事件仍然可用,但是在很多设备上,click 会存在一些延迟,如果想要快速响应的 “click” 事件,需要借助 touch 事件来实现。 element.addeventlistener( 'touch 阅读全文
posted @ 2015-05-14 14:21 surfaces 阅读(655) 评论(0) 推荐(0)
摘要: 第一个 /*! * tap.js * Copyright (c) 2015 Alex Gibson * https://github.com/alexgibson/tap.js/ * Released under MIT license */ /* global define, module */ 阅读全文
posted @ 2015-05-14 14:10 surfaces 阅读(2583) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-05-14 13:53 surfaces 阅读(266) 评论(0) 推荐(0)
摘要: <script> var isIe = !-[1,]; // alert('ie9 之前'+isIe); var ie = 'ActiveXObject' in window; //alert('sadsd'+ie); var ie2 = !!('ActiveXObject' in window); 阅读全文
posted @ 2015-05-14 13:45 surfaces 阅读(912) 评论(0) 推荐(0)
摘要: 使用iScroll时,input等不能输入内容的解决方法 <script> function allowFormsInIscroll(){ [].slice.call(document.querySelectorAll('input, select, button')).forEach(functi 阅读全文
posted @ 2015-05-14 11:26 surfaces 阅读(3120) 评论(0) 推荐(1)
摘要: 参考写的类似的 pie 饼状图 效果如下 代码如下 阅读全文
posted @ 2015-05-14 09:25 surfaces 阅读(17884) 评论(1) 推荐(0)