渣渣大星星的学习笔记


  • Home

  • Categories

  • About

  • Archives

  • Tags

实现Promise

Posted on 2018-12-04 | In es6
手写Promise 参考资料:掘金,手写Promise ​ 阮一峰promise ​ this的指向问题 ​ 1.先看个Promise例子1234new Promise(function (resolve, reject) { console.log(1); resolve('resolve');}) 1) 看到Promise接收一个参数,并且有三种状态 pending,fulfilled,re ...
Read more »

ES6学习笔记

Posted on 2018-12-03 | In es6
ES6学习笔记 Babel 1.const和letlet特点:1.在编译过程中没有变量提升 2.不允许重复声明(同个代码块内) 3.块级作用域(只在声明的代码块内有效) 4.暂时性死区 1)说个问题123456for (var i = 0; i < 5; i++) { setTimeout(() => { console.log(i); }, i * 1000)}// 每隔1秒打印一个5 其实是想每隔一秒打印出0到 ...
Read more »

跨域的几种方式

Posted on 2018-11-27 | In 跨域
跨域的几种方式 参考资料:https://www.bilibili.com/video/av31173487?from=search&seid=17845079103401026420 ​ http://www.ruanyifeng.com/blog/2016/04/cors.html 这里后端全部使用koa,写的只是为了方便理解,很多实际中不应该这样写。例子重复代码太多,但是直接粘贴就可以测试。 1.JSONP1) 举个🌰,打开百度搜索 可以看见 ...
Read more »

浏览器缓存机制

Posted on 2018-11-26 | In 优化
浏览器缓存机制 参考资料:https://www.cnblogs.com/chenqf/p/6386163.html ​ https://juejin.im/post/5a6c87c46fb9a01ca560b4d7 ​ http://www.cnblogs.com/skynet/archive/2012/11/28/2792503.html ​ https://my.oschina.ne ...
Read more »

float

Posted on 2018-11-26 | In css
float属性学习笔记1.float语法1234float:none 不使用浮动float:left 靠左浮动float:right 靠右浮动float:inherit 继承 2.清除浮动的几种方法1)clear:both清除浮动12345<div class="divcss5"> <div class="divcss5_left">布局靠左浮动</div> <div class="divcss5_right">布局靠右浮动 ...
Read more »

meta标签

Posted on 2018-11-24 | In HTML
meta标签学习笔记1.meta标签定义和用法META标签用来描述一个HTML网页文档的属性,例如作者、日期和时间、网页描述、关键词、页面刷新等。它提供的信息虽然用户不可见,但却是文档的最基本的元数据。 标签位于文档的头部,永远位于 head 元素内部,不包含任何内容,并且没有结束标签。 云数据:用来概括描述数据的一些基本数据。也就是描述数据的数据 2.name属性name属性主要用于描述网页,比如网页的关键词,叙述等。与之对应的属性值为content,content中的内容是对name填入 ...
Read more »

VDOM 和 Render方法

Posted on 2018-11-23 | In react入门
VDOM和Render方法1.用普通的JS对象去描述我们需要渲染的内容。1234567891011121314151617181920212223const element = { type: "div", props: { id: "container", children: [ { type: "input", props: { value: "foo", type: "text" } }, &# ...
Read more »

box-sizing属性

Posted on 2018-11-23 | In css
参考资料:https://www.cnblogs.com/ylliap/p/6119740.html CSS3 box-sizing属性1.盒子模型现在所有浏览器都遵循W3C盒子模型,IE6以下遵循IE盒子模型。 1)IE盒子模型 width = border + padding + content 2)W3C盒子模型 width = content 2.box-sizing的三个属性值1)content-box这个属性值,是box-sizing的默认值,遵循W3C盒子模型,看看他的表现 1 ...
Read more »

Sass入门

Posted on 2018-11-23 | In css
Sass入门1.安装Sass(window需要安装Ruby,安装过程中请注意勾选Add Ruby executables to your PATH添加到系统环境变量)1gem install sass 2.编译Sass12345678#单文件转换命令sass test/test.scss output/output.css#单文件监听命令sass --watch test/test.scss:output/output.css#如果你有很多的sass文件的目录,你也可以告诉sass监听整个目录: ...
Read more »

BFC

Posted on 2018-11-23 | In css
BFC学习笔记1.Block Formatting Contexts(格式化上下文)它是页面中的一块渲染区域,并且有一套渲染规则,它决定了其子元素将如何定位,以及和其他元素的关系和相互作用。 2.触发 BFC 浮动元素:float 除 none 以外的值 绝对定位元素:position (absolute、fixed) display 为 inline-block、table-cells、flex overflow 除了 visible 以外的值 (hidden、auto、scroll) ...
Read more »
1…15161718
秦瀚文

秦瀚文

172 posts
48 categories
48 tags
© 2020 秦瀚文
Powered by Hexo
Theme - NexT.Muse