摘要: cnpm install css-loader --save-dev //css-loader 是将css打包进js cnpm install style-loader --save-dev //style-loader 将css通过require方式引入进来 cnpm install sass-l 阅读全文
posted @ 2016-12-14 22:02 Model-Zachary 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 1.单参数 function cheng(a=3){ return a*a; } let cheng= (a=3)=>a*a; console.log(cheng(9)); 2.多参数 function add(a,b){ return a+b; } let add = (a,b)=>a+b; // 阅读全文
posted @ 2016-12-09 16:21 Model-Zachary 阅读(250) 评论(0) 推荐(0) 编辑
摘要: let set = new Set(); //set方法去除重复的数据 [1, 2, 3, 4, 2, 8, 4].map(function (elem) { set.add(elem); //遍历完用add添加至set数组中 }) for (let elem of set) { //利用for.. 阅读全文
posted @ 2016-12-08 18:07 Model-Zachary 阅读(268) 评论(0) 推荐(0) 编辑
摘要: @charset "UTF-8"; /**css初始化**/ body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, te 阅读全文
posted @ 2016-12-08 14:41 Model-Zachary 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 颜色模式 圆角 盒子投影 文字投影 背景图固定 背景图尺寸 模糊背景 阅读全文
posted @ 2016-12-07 16:11 Model-Zachary 阅读(199) 评论(0) 推荐(0) 编辑
摘要: css html 阅读全文
posted @ 2016-12-07 13:08 Model-Zachary 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1px边框在iPhone高清屏下,其实会变成2个物理像素的边框。 注意 给的元素本身要 相对定位 position: relative; 阅读全文
posted @ 2016-12-07 12:46 Model-Zachary 阅读(576) 评论(0) 推荐(1) 编辑
摘要: 它与Set十分相似,对象的值也不能是重复的,与Set不同点: 1.WeakSet成员只能够是对象。 2.作为WeakSet成员的对象都是弱引用,即垃圾回收机制不考虑WeakSet对该对象的引用,也就是说,如果其他对象都不再引用该对象,那么垃圾回收机制会自动回收该对象所占用的内存,不考虑 该对象还存在于WeakSet之中。这个特点意味着,无法引用WeakSet的成员,因此WeakS... 阅读全文
posted @ 2016-12-04 17:45 Model-Zachary 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 和Map区别 Set是一种叫做集合的数据结构,Map是一种叫做字典的数据结构。集合、字典都可以存储不重复的值,集合是以[值,值]的形式存储元素,字典是以[键,值]的形式存储。 用法一 var set = new Set([1, 2, 3, 4, 2, 8, 4]); //两个2 for (var e 阅读全文
posted @ 2016-12-04 17:00 Model-Zachary 阅读(483) 评论(0) 推荐(0) 编辑
摘要: let s1 = Symbol(33); let s2 = Symbol(33); alert(typeof(s1)); //数据类型判断 // alert(s1.toString()); //可把一个逻辑值转换为字符串,并返回结果 alert(s1==s2); 阅读全文
posted @ 2016-12-04 14:52 Model-Zachary 阅读(250) 评论(0) 推荐(0) 编辑