静文sophie

导航

 

2015年9月2日

摘要: manifest首先需要服务器的支持 contengType = text/cache-manifestmanifest三部分CACHE MANIFESTNETWORK *FALLBACK1 manifest目前缓存会缓存下页面本身。2 manifest如果有更新,那么里面的所有缓存元素都会更新,所... 阅读全文
posted @ 2015-09-02 14:02 静文sophie 阅读(327) 评论(0) 推荐(0) 编辑
 

2015年8月25日

摘要: var docElement = document.compatMode === 'BackCompat' ? document.body : document.documentElement;//如果是非标准,则是document.body,不然是document.documentELement,... 阅读全文
posted @ 2015-08-25 17:52 静文sophie 阅读(180) 评论(0) 推荐(0) 编辑
 

2015年8月24日

摘要: 一、 mixError用来给出错误function minErr(module, ErrorConstructor) { ErrorConstructor = ErrorConstructor || Error; return function() { var code = argumen... 阅读全文
posted @ 2015-08-24 15:21 静文sophie 阅读(238) 评论(0) 推荐(0) 编辑
 
摘要: 1 先看下用到的一些东西 数组的foreach [].forEach(function(value, index, array){}) 数组的filter [].filter(callback,[thisObject])2 nodeType element : 1, attr : 2, ... 阅读全文
posted @ 2015-08-24 13:43 静文sophie 阅读(134) 评论(0) 推荐(0) 编辑
 
摘要: 1 zepto的swipe事件无效 document.addEventListener('touchmove', function (event) { event.preventDefault(); }, false);2 zepto的tap点透 延迟处理,加上setTimeout 引... 阅读全文
posted @ 2015-08-24 11:36 静文sophie 阅读(165) 评论(0) 推荐(0) 编辑
 

2015年8月23日

摘要: //事件监听var EventTarget = function( sender ){ this._sender = sender; this._listeners = {};}EventTarget.prototype = { constructor: EventTarget, ... 阅读全文
posted @ 2015-08-23 12:43 静文sophie 阅读(149) 评论(0) 推荐(0) 编辑
 

2015年8月21日

摘要: 旨在纪录seajs的api,公司还在用sea呢1 seajs.configseajs.config({// 别名配置:文件的真实路径与调用标识分开,以免调用标识太长 alias: { 'es5-safe': 'gallery/es5-safe/0.9.3/es5-safe', 'jso... 阅读全文
posted @ 2015-08-21 16:18 静文sophie 阅读(166) 评论(0) 推荐(0) 编辑
 

2015年8月20日

摘要: 1 安装全局 $ npm install --global gulp2 安装局部(官方说明需要同时安装全局和局部) $ npm install --save-dev gulp3 安装外挂编译Sass (gulp-ruby-sass)Autoprefixer (gulp-autoprefixer)... 阅读全文
posted @ 2015-08-20 14:52 静文sophie 阅读(187) 评论(0) 推荐(0) 编辑
 

2015年8月19日

摘要: 1 text-size-adjust: 100%; font-size<12px 不推荐none,因为none会导致页面缩放失效 属性是为解决移动设备上横屏问题而出现的,取消横屏切换时字号变大 另外,桌面谷歌27以上已经不支持这个属性了,可用transform:scale(0.875)替代不... 阅读全文
posted @ 2015-08-19 17:28 静文sophie 阅读(145) 评论(0) 推荐(0) 编辑
 
摘要: 这个主要是学习http://www.w3cplus.com/css3/a-guide-to-flexbox.html这里的文章,做个记录,以备日后查询。flex让容器有能力使得其中的子项目自由布局,充分利用空间。比较适合应用程序的组件和小规模布局flex包括容器 和 子项目两部分。对容器来说,有以下... 阅读全文
posted @ 2015-08-19 15:52 静文sophie 阅读(204) 评论(0) 推荐(0) 编辑