Skip to content

Commit

Permalink
zh-cn: update the description of the beforeprint event (#23815)
Browse files Browse the repository at this point in the history
Co-authored-by: A1lo <[email protected]>
  • Loading branch information
yuexiaqingmiao and yin1999 authored Oct 1, 2024
1 parent 6ac21ff commit 4547070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/window/beforeprint_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: Web/API/Window/beforeprint_event

{{APIRef}}

当相关联的文档即将打印或关闭打印预览时,将触发 **`beforeprint`** 事件
**`beforeprint`** 事件会在相关联的文档即将打印或预览打印时触发

{{domxref("Window.afterprint_event", "afterprint")}} 和 `beforeprint` 事件允许页面在打印开始之前更改其内容(例如,也许是移除 banner)然后在打印完成后还原这些更改。一般来说,你应该更倾向于使用 [`@media print`](/zh-CN/docs/Web/CSS/CSS_media_queries/Using_media_queries) CSS at 规则,但在某些情况下可能有必要使用这些事件。

Expand Down

0 comments on commit 4547070

Please sign in to comment.