- 博客(233)
- 资源 (2)
- 收藏
- 关注
原创 Weakmap,Weakset,Set,Map
Set is similar to the array, but it ensure that all the value are unique.Map is similar to the object, but the key of the map can be object.Weakmap and weakset can’t be iterated.WeakMap and WeakSe...
2018-07-10 11:34:42
485
原创 How are the image cached in the browser?
Today I encounter a bug.The chrome browser has cached all the images .By chrome dev-tool can find that the images were loaded from the memory cache.As usual , we can forcedly refresh the page(usint ct...
2018-07-04 09:49:22
336
原创 2017/8/7-2017/8/13 周结
JavaScript1. js中的eventLoopreference:js的事件模型 JS引擎会把所有任务分成两类: * macroTask: setTimeout,setIntervel,setImmediate,requestAnimationFrame,I/O,UI rendering * microTask: process.nextTic,Promise(),MutationOb
2017-08-13 14:26:43
466
原创 js学习小结(十六)--javascript 高级程序设计-DOM扩展
针对class的扩展 1. getElementsByClassName,通过class来获取元素 2. classList,contains(),toggle(),add(),remove()可以很方便的操作class焦点API * document.activeElement * document.hasFocus() * if client i
2017-08-13 14:13:55
523
原创 草稿
nginx的rewrite https://juejin.im/entry/58df166a0ce463005821e9d9#%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86flexbox ie9 http://wow.techbrood.com/fiddle/11270
2017-07-25 15:23:53
456
原创 2017/7/17-2017/7/23
nginx 配置反向代理和代理转发。upstream server-api{ # api 代理服务地址 server 127.0.0.1:3110; }upstream server-resource{ # 静态资源 代理服务地址 server 127.0.0.1:3120;}server { listen 3111; s
2017-07-23 10:37:27
528
原创 ie,firefox踩坑篇
1. jquery的prop(“disabled”,false) 在ie和firefox中不生效,必须使用attr()方法。
2017-06-30 11:11:22
494
原创 跨域请求 fetch 实现
reference : [1].https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS 1.CORS 的分类分为两大类:简单的请求;带有preflight预请求的CORS。两类请求的区分标准如下:简单请求某些请求不会触发 CORS 预检请求。本文称这样的请求为“简单请求”。若请求满足所有下述条件,则该请求可视为“简
2017-06-07 13:27:21
13384
原创 es6-解构赋值和默认值
// 写法一function m1({x = 0, y = 0} = {}) { return [x, y];}// 写法二function m2({x, y} = { x: 0, y: 0 }) { return [x, y];}// console.log(m1());// console.log(m2());console.log(m1({x:1}));//[1,0]c
2017-04-11 15:28:54
1103
原创 js原生事件怎么注册
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> <script> function calc(){ console.log("d"); } </scrip
2017-04-04 09:04:28
766
1
转载 CSS背景 background-background position
转自:http://jackie-anxis.com/2016/11/29/CSS@7%E8%83%8C%E6%99%AF/
2017-03-28 12:45:44
435
原创 less- how to minus px?
div { > span { @pad: 10px; width:calc(~'100% - @{pad}'); }}div { > span { width:calc(~'100% - 10px'); }}
2017-03-28 12:43:21
578
原创 charles how to proxy a folder
线上的静态资源都是经过加密压缩过的,通过代理映射到本地源代码来调试会非常高效。右键要代理的资源,选择【Map Local】弹出映射窗口,注意在path中可以通过*来指向一个文件夹例如:
2017-03-27 08:18:47
483
原创 array - mutation method and non-mutation method
Mutation method means that the method will change the origin array,like push,pop,shift,unshift,splice,sort,reverse.PS: Especially note that the splice is a pretty convenient method of deleting ,inserti
2017-03-22 08:34:30
384
转载 Animation and Transition ,what's the differences between them?
Prepare: Rendering PerformanceAnimation and Transition Comparison
2017-03-15 14:21:29
399
原创 伪类和伪元素的应用与区别
css content attribute can only apply to psudohttp://www.alloyteam.com/2016/05/summary-of-pseudo-classes-and-pseudo-elements/https://www.qianduan.net/before-and-before-the-difference-between/
2017-03-07 07:45:04
491
原创 2017/2/20-2017/2/26
工作总结这一周主要是写了两个landing-page 页面,两个landing-page 页面都需要做响应式,那么响应式需要涉及几个点,最主要的是布局方面,其次是移动端的手势事件处理。技术总结移动端布局 在最开初的时候准备使用BootStrap做响应式,但是在做第一个页面的时候,发现BS不够灵活,BS的定位应该是针对非专业前端快速搭建页面的场景。而作为一个专业前端,我觉得布局自己写,会更加
2017-02-26 13:12:10
473
转载 转载-面试感悟----一名3年工作经验的程序员应该具备的技能
原文地址http://www.cnblogs.com/xrq730/p/5260294.html,转载请注明出处,谢谢!
2017-02-26 08:10:36
424
原创 如何书写css 注释
http://stackoverflow.com/questions/12298890/is-it-bad-practice-to-comment-out-single-lines-of-css-with必须用/**/注释,//并不是注释。。。
2017-02-16 11:06:23
803
原创 git原理
在什么情况下,两个文件会merge,两个文件会conflict?分支上删除的文件,本地没删除,git pull 之后,本地的磁盘上,还是有文件夹a
2017-02-16 08:59:40
345
原创 how to implement the version control of static files
https://github.com/sindresorhus/gulp-rev/blob/master/integration.md 如何通过后端服务(php)做静态资源的版本话,当然也有直接通过构建工具做后端服务的版本化, 下面是angular项目,如何实现版本化。/*** build 时的 js 压缩, 文件 hash 地址替换*/var gulp = require('gulp')
2017-02-09 12:49:29
401
转载 如何组织gulp文件
很详细的gulp文件组织方式 https://www.freshconsulting.com/how-to-organize-your-gulp-js-development-builds-for-multiple-environments/gulp-util,可以用来判断环境变量,然后决定编译方式
2017-02-09 11:48:41
480
原创 网页优化
如何做到瞬时加载? 没有兆字节大小的图片,阻塞渲染的广告,没有十万行的js代码。 PWA(Progressive Web App) & AMP(Accelerating Mobile Page)
2017-01-03 11:06:32
641
原创 Control the frequency of method execution-Debounce,Throttle,RequestAnimationFrame
the animation of debounce demo is considerably interesting. https://css-tricks.com/debouncing-throttling-explained-examples/
2016-12-12 20:22:41
485
原创 如何重置mysql的登录密码
mac上面,使用mysql的.dmg 安装好mysql之后,不知道登录密码,然后采用以下方式重置了登录密码。 http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html
2016-09-23 15:00:35
496
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人