Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh-cn: update the description of the beforeprint event #23815

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`** 事件。
yin1999 marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down