chore: 全量图片替换为 WebP 格式

This commit is contained in:
ZiuChen
2025-08-02 00:17:17 +08:00
parent 14435f3e6a
commit 5d7b8e8d9e
96 changed files with 40 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1461,7 +1461,7 @@ FC全称是 Formatting Context 译作格式化上下文。元素在标准流
}
```
![](CSS.assets/BFC-1.jpg)
![](CSS.assets/BFC-1.webp)
我们为两个元素分别设置垂直方向的`margin`此时BFC的规则就被触发了**在同一个BFC中**,垂直方向的`margin`会发生折叠,取二者较大的值,真正的边距变成了`20px`,而不是臆想中的`30px`
@@ -1478,7 +1478,7 @@ FC全称是 Formatting Context 译作格式化上下文。元素在标准流
}
```
![](CSS.assets/BFC-2.jpg)
![](CSS.assets/BFC-2.webp)
这两个盒子位于同一个BFC之中进行布局`<html>`标签形成的BFC
@@ -1550,7 +1550,7 @@ FC全称是 Formatting Context 译作格式化上下文。元素在标准流
}
```
![](CSS.assets/BFC-3.jpg)
![](CSS.assets/BFC-3.webp)
我们不能简单的从现象归纳本质:*BFC让浮动元素向父级元素汇报了高度所以解决了高度塌陷的问题*
@@ -1593,7 +1593,7 @@ FC全称是 Formatting Context 译作格式化上下文。元素在标准流
`.container`设置`overflow: auto;`,让`.container`创建一个新的BFC这样之前的高度塌陷问题也能够被解决
![](CSS.assets/BFC-4.jpg)
![](CSS.assets/BFC-4.webp)
官方文档中是这样解释的:

View File

@@ -35,7 +35,7 @@ Node.js是一个基于**V8 JavaScript引擎**的**JavaScript运行时环境**
- JavaScript代码 -> V8 -> Node.js Bindings -> LibUV
- LibUV是使用**C语言编写的库**,提供了**事件循环、文件系统读写、网络IO、线程池**等等内容
![The Node.js System](Front-end-Engineering.assets/the-node.js-system.jpeg)
![The Node.js System](Front-end-Engineering.assets/the-node.js-system.webp)
### Node.js的应用场景
@@ -635,7 +635,7 @@ ESModule的解析过程可以分为三个阶段
- 运行代码,计算值,并且将值填充到内存地址中
- 将导入导出的**值**赋给对应的变量`name = 'Ziu'`
![ESModule解析过程](Front-end-Engineering.assets/esmodule-phases.png)
![ESModule解析过程](Front-end-Engineering.assets/esmodule-phases.webp)
文章推荐:[ES modules: A cartoon deep-dive](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/)
@@ -1001,7 +1001,7 @@ PNPMperformant npm有以下优点
- 符号链接 是一类特殊的文件
- 其包含有一条以绝对路径或者相对路径的形式**指向其他文件或者目录的引用**
![hard-link and soft-link](Front-end-Engineering.assets/hard-link-and-soft-link.jpg)
![hard-link and soft-link](Front-end-Engineering.assets/hard-link-and-soft-link.webp)
操作系统使用不同的**文件系统****对真实的硬盘读写操作做了一层抽象**,借由文件系统,我们得以方便地操作和访问文件的真实数据
@@ -1055,7 +1055,7 @@ PNPMperformant npm有以下优点
- 在`node_modules/.pnpm`中,包含了附加版本信息的真实文件(硬链接到硬盘数据的文件)
- 所有间接依赖,都通过软链接的方式,链接到被铺平在`.pnpm`文件夹中对应版本的硬链接文件上
![how pnpm works](Front-end-Engineering.assets/how-pnpm-works.jpg)
![how pnpm works](Front-end-Engineering.assets/how-pnpm-works.webp)
#### 常用命令

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1453,9 +1453,9 @@ inherit(Student, Person)
- 遇到`<script>`标签则向服务器请求下载`.js`文件
<img src="./JavaScriptEnhanced.assets/image-20221118222207332-16687813334481.png" alt="浏览器解析HTML过程" style="zoom:80%;" />
<img src="./JavaScriptEnhanced.assets/image-20221118222207332-16687813334481.webp" alt="浏览器解析HTML过程" style="zoom:80%;" />
<img src="./JavaScriptEnhanced.assets/image-20221118222311200-16687813941873.png" alt="浏览器是和如何工作的" style="zoom:80%;" />
<img src="./JavaScriptEnhanced.assets/image-20221118222311200-16687813941873.webp" alt="浏览器是和如何工作的" style="zoom:80%;" />
[How browsers work](https://web.dev/howbrowserswork/)
@@ -1580,7 +1580,7 @@ inherit(Student, Person)
在开发者工具的图层工具中可以看到,两个元素`.box1``.box2`都是在一个层Document下渲染的
![image-20221122103111654](./JavaScriptEnhanced.assets/image-20221122103111654.png)
![image-20221122103111654](./JavaScriptEnhanced.assets/image-20221122103111654.webp)
##### 案例2分层渲染
@@ -1595,7 +1595,7 @@ inherit(Student, Person)
}
```
![image-20221122103256116](./JavaScriptEnhanced.assets/image-20221122103256116.png)
![image-20221122103256116](./JavaScriptEnhanced.assets/image-20221122103256116.webp)
##### 案例3transform 3D
@@ -1613,7 +1613,7 @@ inherit(Student, Person)
}
```
![image-20221122103715428](./JavaScriptEnhanced.assets/image-20221122103715428.png)
![image-20221122103715428](./JavaScriptEnhanced.assets/image-20221122103715428.webp)
##### 案例4transition+transform
@@ -1731,7 +1731,7 @@ JavaScript代码下载好后是如何一步步被执行的
### JavaScript V8引擎
![image-20221125090752249](./JavaScriptEnhanced.assets/image-20221125090752249.png)
![image-20221125090752249](./JavaScriptEnhanced.assets/image-20221125090752249.webp)
JS源代码经过解析生成抽象语法树词法分析器、语法分析器经过ignition转为字节码二进制、跨平台即可由CPU执行
@@ -1751,7 +1751,7 @@ JS源代码经过解析生成抽象语法树词法分析器、语法分析
- 但是机器码实际上也会被还原为ByteCode这是因为如果后续执行函数的过程中类型发生了变化比如sum函数原来执行的是number类型后来执行变成了string类型之前优化的机器码并不能正确的处理运算就会逆向的转换成字节码
- 官方文档https://v8.dev/blog/turbofan-jit
![image-20221125094148365](./JavaScriptEnhanced.assets/image-20221125094148365.png)
![image-20221125094148365](./JavaScriptEnhanced.assets/image-20221125094148365.webp)
Blink 获取到源码 => 转为Stream => Scanner扫描器

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -1108,7 +1108,7 @@ export default function App() {
我们需要在组件的不同生命周期中执行不同的操作,比如添加解除监听器、发起网络请求等
![React Life Cycle: https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/](./React.assets/react-life-cycle.png)
![React Life Cycle: https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/](./React.assets/react-life-cycle.webp)
结合上图,解读一下组件的完整生命周期:
@@ -1979,7 +1979,7 @@ export default class Player extends Component {
从React的源码可以看到setState方法是从Component集继承而来的
![setState in source code of React](./React.assets/prototype-setState.png)
![setState in source code of React](./React.assets/prototype-setState.webp)
### setState的异步更新