摘要: 一、水平居中 1、行内元素:text-align:center; 2、块级元素:margin:0 auto; 3、绝对定位和移动:absolute + transform 4、绝对定位和负边距:absolute + margin 5、flex布局:flex + justify-content:cen 阅读全文
posted @ 2019-11-08 15:08 蛋炒饭123 阅读(341) 评论(0) 推荐(0) 编辑
摘要: Vue的生命周期主要分为8个阶段:beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestroy、destroyed。 beforeCreate:vue实例的挂载元素$el和数据对象data都是undefined 阅读全文
posted @ 2019-11-08 14:31 蛋炒饭123 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1、String的拓展 ① str.includes("abc"); ② str.startWith("abc"); ③ str.endWith("abc"); ④ str.repeat(5) 2、Number的拓展 ① 二进制数值:0b, 八进制数值:0o ② Number.isFinite(i) 阅读全文
posted @ 2019-11-08 13:51 蛋炒饭123 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1、对象的拓展 ①Object.create(obj, {age:{value:18, writable:true, configurable:true, enumerable:true}); 以指定对象为原型创建新的对象 ②Object.defineProperties(obj, fullname 阅读全文
posted @ 2019-11-08 09:47 蛋炒饭123 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1、$.each() jquery中的方法 遍历数组$.each(arr, function(index, value){ console.log(value); }) 1 遍历数组 2 $.each(obj, function(key, value){ 3 console.log(key, val 阅读全文
posted @ 2019-11-08 09:32 蛋炒饭123 阅读(116) 评论(0) 推荐(0) 编辑