摘要: Emmet(前端必备) Emmet 项目的前身是前端开发人员熟知的 Zen Coding(快速编写 HTML/CSS 代码的方案)。在 Sublime Text 编辑器中搭配 Emmet 插件真的是让你编码快上加快。 SublimeLinter SublimeLinter 是前端编码利器,用于高亮提 阅读全文
posted @ 2017-01-22 14:45 xiaoxiaohui 阅读(449) 评论(0) 推荐(0) 编辑
摘要: xcrun: error: unable to find utility "simctl", not a developer tool or in PATH 安装xcode 终端运行: xcode-select --install 或者是安装成功继续第3步,否则继续 xcode-select: er 阅读全文
posted @ 2016-12-06 10:33 xiaoxiaohui 阅读(2829) 评论(0) 推荐(0) 编辑
摘要: 用css3的animation完成一个动画,当只有这个动画完成时才执行令一个事件,比如让动画保持在终止的状态或其他一些事件。我们该怎么办呢。 第一种方法: 用计时器,设定一个和动画时长一样的time,过time事件去执行这个函数。 setTimeout(function(){ },time); 第二 阅读全文
posted @ 2016-11-17 15:25 xiaoxiaohui 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 文件的hash指纹通常作为前端静态资源实现增量更新的方案之一,Webpack是目前最流行的开源编译工具之一,其强大的功能也带来很多坑(当然,大部分麻烦其实都可以在官方文档中找到答案)。 比如,在Webpack编译输出文件的配置过程中,如果需要为文件加入hash指纹,Webpack提供了两个配置项可供 阅读全文
posted @ 2016-09-30 10:39 xiaoxiaohui 阅读(437) 评论(0) 推荐(0) 编辑
摘要: @charset "utf-8"; html, body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin: 0; padding: 0; -web... 阅读全文
posted @ 2016-08-13 16:06 xiaoxiaohui 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 移动端图片操作(一)——上传 上传我们一般都是用“input[type=file]”控件。当你用此控件时,你就授权了网页和服务器访问对应的文件,就可以得到File对象。 友情提示在,在Android手机webview中,是不支持上传文件的,网上说是修改Android端的代码,但我没试过,我们这边是使 阅读全文
posted @ 2016-02-22 15:24 xiaoxiaohui 阅读(1739) 评论(0) 推荐(0) 编辑
摘要: /** * @ description Model MVC中M 数据模型 * @ Object * @ public * @ create method IE不支持 */if(typeof Object.create !== 'function'){ Object.create = funct... 阅读全文
posted @ 2015-01-26 00:12 xiaoxiaohui 阅读(255) 评论(0) 推荐(0) 编辑
摘要: /** * @description 扩展function的原型 * @function * @obj this的上下文 */if(!Function.prototype.bind){ Function.prototype.bind = function(obj){ var slice = [].... 阅读全文
posted @ 2015-01-19 23:34 xiaoxiaohui 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 事件对象event的位置属性,这些参数比较容易混淆1. pageX,pageY :IE不识别的,鼠标在页面上的位置,从页面左上角开始,即是以页面为参考点,不随滑动条移动而变化,其实就是clientY+scrollTop,参考点是页面2. clientX,clientY:鼠标在页面上可视区域的位置,从... 阅读全文
posted @ 2015-01-14 12:13 xiaoxiaohui 阅读(175) 评论(0) 推荐(0) 编辑
摘要: function openIos(url, callback) { if (!url) { return; } var node = document.createElement('iframe'); node.style.display = 'none'; ... 阅读全文
posted @ 2014-12-24 12:00 xiaoxiaohui 阅读(393) 评论(0) 推荐(0) 编辑