From 58abd0e04b88435a8818a89fc0d7640f38603f19 Mon Sep 17 00:00:00 2001 From: wupolung Date: Sat, 8 Feb 2025 17:03:03 +0800 Subject: [PATCH] [zh-tw] add the translation of the global attribute `style` (#25526) --- .../web/html/global_attributes/style/index.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 files/zh-tw/web/html/global_attributes/style/index.md diff --git a/files/zh-tw/web/html/global_attributes/style/index.md b/files/zh-tw/web/html/global_attributes/style/index.md new file mode 100644 index 00000000000000..eb9fe860adb663 --- /dev/null +++ b/files/zh-tw/web/html/global_attributes/style/index.md @@ -0,0 +1,28 @@ +--- +title: style +slug: Web/HTML/Global_attributes/style +l10n: + sourceCommit: 476fb44932d56c0f50628a620348cd77f411b5ab +--- + +{{HTMLSidebar("Global_attributes")}} + +**`style`** [全域屬性](/zh-TW/docs/Web/HTML/Global_attributes) 包含要應用於此元素的 [CSS](/zh-TW/docs/Web/CSS) 樣式宣告。請注意,建議將樣式定義在單獨的檔案中。此屬性和 {{HTMLElement("style")}} 元素主要目的是允許快速設定樣式,例如用於測試目的。 + +{{EmbedInteractiveExample("pages/tabbed/attribute-style.html","tabbed-shorter")}} + +> [!NOTE] +> 此屬性不得用於傳達語義資訊。即使所有樣式都被移除,頁面也應該保持語義正確。通常不應該使用它來隱藏不相關的資訊;這應該使用 [`hidden`](/zh-TW/docs/Web/HTML/Global_attributes/hidden) 屬性來完成。 + +## 規範 + +{{Specifications}} + +## 瀏覽器相容性 + +{{Compat}} + +## 參見 + +- [全域屬性](/zh-TW/docs/Web/HTML/Global_attributes) +- {{domxref("HTMLElement.style")}}