摘要: @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 xuanPhoto 阅读(275) 评论(0) 推荐(0)
摘要: css边缘羽化 background: #fff; box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; 颜色模式 rgba(0,0,0,0.5) a代表alpha半透明通道 但凡是用到颜色的地方,都可以使用rgba颜色模式。 包括文字颜色, 阅读全文
posted @ 2016-12-07 16:11 xuanPhoto 阅读(245) 评论(0) 推荐(0)
摘要: css html 阅读全文
posted @ 2016-12-07 13:08 xuanPhoto 阅读(171) 评论(0) 推荐(0)
摘要: 1px边框在iPhone高清屏下,其实会变成2个物理像素的边框。 注意 给的元素本身要 相对定位 position: relative; 阅读全文
posted @ 2016-12-07 12:46 xuanPhoto 阅读(627) 评论(0) 推荐(1)
摘要: 它与Set十分相似,对象的值也不能是重复的,与Set不同点: 1.WeakSet成员只能够是对象。 2.作为WeakSet成员的对象都是弱引用,即垃圾回收机制不考虑WeakSet对该对象的引用,也就是说,如果其他对象都不再引用该对象,那么垃圾回收机制会自动回收该对象所占用的内存,不考虑 该对象还存在于WeakSet之中。这个特点意味着,无法引用WeakSet的成员,因此WeakS... 阅读全文
posted @ 2016-12-04 17:45 xuanPhoto 阅读(202) 评论(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 xuanPhoto 阅读(498) 评论(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 xuanPhoto 阅读(261) 评论(0) 推荐(0)
摘要: 1.数组解构 let [a, b, c,d] = ["aa", "bb", 77,88]; alert(a) //弹出aa 可以用babel 解析看ES5的转换结果 嵌套数组解构 let [a,b,[c,d],e] =["aa",'bb',[33,44],55]; alert(c) //弹出33 空 阅读全文
posted @ 2016-12-04 14:42 xuanPhoto 阅读(253) 评论(0) 推荐(0)
摘要: 本案例以实现侧边栏的效果为例来说明 直接上代码看效果: css html 利用name像id,class那样是元素都可以添加的特征,然后利用attr在css里来添加属性,再让其在:after里面进行添加内容为文字 这种运用方式很巧妙 阅读全文
posted @ 2016-12-04 10:57 xuanPhoto 阅读(485) 评论(0) 推荐(0)
摘要: indexOf()方法 filter筛选 forEach遍历与map遍历 阅读全文
posted @ 2016-12-02 11:14 xuanPhoto 阅读(802) 评论(0) 推荐(0)