摘要: 1、全局中的this ,指的是window console.log(this);//window function abc(){ console.log(this)//window } abc(); 2、事件中的this 什么是事件,当前这个函数,在addEventListener中被传入第二个参数 阅读全文
posted @ 2022-01-10 00:37 thomas_001 阅读(413) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-01-09 21:24 thomas_001 阅读(106) 评论(0) 推荐(0)
摘要: Redux一样,当你不知道是否需要Vuex那就是不需要。不要因为想用Vuex而使用它。Vuex是Vue的一个全局状态管理模块,它的作用是多个组件共享状态及数据,当某个组件将全局状态修改时,在绑定了该状态的另一个组件也将响应。实际上可以将Vue理解为一个function,在Vue的作用域中有一个数据代 阅读全文
posted @ 2022-01-07 23:35 thomas_001 阅读(57) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-01-07 23:19 thomas_001 阅读(37) 评论(0) 推荐(0)
摘要: let Methods = (function () { return { // 随机颜色 randomColor: function () { var color = '#' for (let i = 0; i < 6; i++) { var num = parseInt(Math.random( 阅读全文
posted @ 2022-01-04 22:50 thomas_001 阅读(35) 评论(0) 推荐(0)
摘要: 第一种方法 div{ positition:absolute; left:50%;(移动到参考物的宽度中心点的右侧) margin-left:-当前元素宽度的一半;盒子再向左移动 top:50%;(移动到参考物的高度中心点的下侧) margin-top:-当前元素高度的一半;盒子再向上移动 } 注意 阅读全文
posted @ 2021-12-09 12:05 thomas_001 阅读(269) 评论(0) 推荐(0)
摘要: 当我自己遇到这个问题时候,我百度了很多方法,都没有解决,其实说白了就是权限问题,以及自己去配置iterm2也遇到了很多问题,但是最后解决了以后你会发现问题都不是问题 哈哈,先上自己的图 因为自己安装成功了,所以我在网上找的同样报错的图,大家可以看看 百度了很久,这是我自己用过得解决方案,解决权限的问 阅读全文
posted @ 2021-11-30 17:06 thomas_001 阅读(377) 评论(0) 推荐(0)
摘要: <!DOCTYPE > <html> <head> <title>test3改良版</title> <meta charset="utf-8"> <style> *{ padding:0; margin:0; list-style: none; }/* 初始化格式 */ .L{ width:300p 阅读全文
posted @ 2021-11-30 00:31 thomas_001 阅读(35) 评论(0) 推荐(0)
摘要: 我们要求你在不使用CSS hacks 的情况下更新你的页面.假如你想针对IE或者避开IE,你可以使用条 件注释.” 那么条件注释如何工作呢? 步骤一:针对ie,创建一个新的样式文件 步骤2:在html文档的开头添加条件注释的代码 只有指定的ie浏览器版本识别这个新的样式,其他的浏览器就会彻底忽略 平 阅读全文
posted @ 2021-11-30 00:23 thomas_001 阅读(37) 评论(0) 推荐(0)