07 2017 档案
摘要:class Event{ constructor(){ this.handlers=[] } on(type,fn){ //订阅事件 if(!this.handlers[type]){ this.handlers[type] = []; } this.handlers[type]...
阅读全文
摘要:function getVendorPrefix() { var body = document.body || document.documentElement, style=body.style, vendor = ['webkit' , 'khtml' , 'moz' , 'ms' , 'o'], i = 0; while(i...
阅读全文
摘要:const _ARRAY_NAME = "[object Array]" const _OBJECT_NAME = "[object Object]" //扩展 export function extend(target) { var targets, arg = Array.from(arguments).slice(1,arguments.length); if(arg....
阅读全文
摘要:function isEmptyObject(e){ //是否是空对象 var t; for(var t in e){ retrun false; } retrun true; }
阅读全文
摘要:结果: box test box2 addEventListener( name , function , boolean ) boolean (true) :该事件为捕获事件,当事件触发时候,在捕获阶段就执行 boolean (false) :该事件为冒泡事件,当事件触发时候,在冒泡阶段就执行 事
阅读全文
摘要:::-webkit-scrollbar{width: 6px;height: 6px;} ::-webkit-scrollbar-thumb{background-color: #cfcfd2;border-radius: 8px;background-clip: padding-box;min-height: 28px;} ::-webkit-scrollbar-track-piece{...
阅读全文
摘要:1.组件代码 2.引入组件 代码仅供参考,具体功能可以自己扩展。 个人博客 :精华所在 https://gilea.cn/ http://www.cnblogs.com/jiebba 我的博客,来看吧!
阅读全文