Skip to content

Commit 3cf05e8

Browse files
committed
fix: 修改博客toc
1 parent 5aee7d1 commit 3cf05e8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

blog/2022-10-29-IntersectionObserver用法.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ authors: oxygen
1212

1313
<!--truncate-->
1414

15-
# IntersectionObserver 介绍
16-
1715
W3C 在 [2017-09-14](https://www.w3.org/standards/history/intersection-observer) 正式发布了`IntersectionObserver` API 草案,其功能上提供了检测目标元素在祖先元素或 [viewport](https://developer.mozilla.org/zh-CN/docs/Glossary/Viewport) 内可视情况变化的方式,这种观测是异步的,保证了开发上的便捷和性能上的高效。
1816

1917
## IntersectionObserver类型定义
@@ -169,7 +167,9 @@ interface IntersectionObserverEntry {
169167

170168
:::
171169

172-
## 判断元素是否可见
170+
## IntersectionObserver用例
171+
172+
### 判断元素是否可见
173173

174174
通过`IntersectionObserver`我们可以判断元素是否可见的两种情况:
175175

@@ -195,8 +195,6 @@ interface IntersectionObserverEntry {
195195
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
196196
loading="lazy"
197197
></iframe>
198-
## IntersectionObserver用例
199-
200198
### Image Lazyload
201199

202200
<iframe src="https://codesandbox.io/embed/hopeful-poincare-uuhiob?fontsize=14&hidenavigation=1&theme=dark"

0 commit comments

Comments
 (0)