摘要: node 01 天 node.js 欢迎您,来到后台的世界。 学node.js 前的一些话 1.什么是node.js 2.node.js 的特点 2. node.js 适合什么样的业务 3.cmd 基本的命令 4. 安装 node.js 5. node.js 环境 6. 模块 7. 自己定义模块 9 阅读全文
posted @ 2017-06-30 15:45 程爱英 阅读(196) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-06-19 17:08 程爱英 阅读(6) 评论(0) 推荐(0) 编辑
摘要: text() 方法方法设置或返回被选元素的文本内容(innerText): html() 方法返回或设置被选元素的内容 (innerHTML),包括标签: 1234 $(" data").text(); //返回1234,data内的标签会被忽略,只会返回内容,类似js中innerText $(" 阅读全文
posted @ 2018-04-26 20:42 程爱英 阅读(989) 评论(0) 推荐(0) 编辑
摘要: .box{ overflow: hidden; width: 100%; display:flex;/ 设为伸缩容器 / display: webkit flex; flex flow:row; } .box .left{ webkit flex: 0 0 180px; ms flex: 0 0 1 阅读全文
posted @ 2018-04-26 20:28 程爱英 阅读(149) 评论(0) 推荐(0) 编辑
摘要: .box{ overflow: hidden; width: 100%; display:flex;/ 设为伸缩容器 / display: webkit flex; flex flow:row; } .box .left{ webkit flex: 0 0 180px; ms flex: 0 0 1 阅读全文
posted @ 2018-04-26 20:27 程爱英 阅读(279) 评论(0) 推荐(0) 编辑
摘要: //封装一个函数 function ImgToBase64(file, maxLen, callBack) { var img = new Image(); var reader = new FileReader();//读取客户端上的文件 reader.onload = function () { 阅读全文
posted @ 2018-04-26 20:23 程爱英 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 延迟加载: obj.offsetTop {margin:0;padding:0;list style:none;} li{ width: 200px; height: 200px; border: 1px solid 000; float: left; margin:10px; } img{ wid 阅读全文
posted @ 2017-08-09 09:38 程爱英 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 自己偷偷地加载 预加载的原理 var img = new Image() img.src = ''; //页面上放很多img,设置成隐藏 img.onload=function(){ //加载完成了 }; img.onerror = funciton(){ //加载出错了 } 例子: div1{ w 阅读全文
posted @ 2017-08-09 09:31 程爱英 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1)子级:一级(一层) 父级.children children不包含文本节点 2)父级: obj.parentNode 3)兄弟元素 下一个兄弟: var oNext=obj.nextElementSibling || obj.nextSibling; obj.nextElementSibling 阅读全文
posted @ 2017-08-09 09:26 程爱英 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1)用findInArray,把结果放到新数组 function findInArray(arr,n){ for(var i = 0; i < arr.length; i++){ if (n == arr[i]) { return true; } } return false; } var arr 阅读全文
posted @ 2017-08-09 09:20 程爱英 阅读(51) 评论(0) 推荐(0) 编辑
摘要: { margin: 0; padding: 0; } .box { width: 300px; height: 300px; margin: 100px auto; position: relative; transform style: preserve 3d; transform: perspe 阅读全文
posted @ 2017-08-09 09:19 程爱英 阅读(103) 评论(0) 推荐(0) 编辑
摘要: { margin: 0; padding: 0; list style: none; } ul { position: relative; margin: 100px auto; width: 300px; height: 300px; transform style: preserve 3d; t 阅读全文
posted @ 2017-08-09 09:17 程爱英 阅读(108) 评论(0) 推荐(0) 编辑