Apple Pages 貼上的 HTML 包含 WebKit 特定的 CSS 屬性、-apple- 前綴樣式和使用 Apple 系統字型的字型宣告。Publish Helper 可將 Pages 的輸出清理為跨平台、瀏覽器相容的 HTML。
Pages 產生的 HTML 帶有 -webkit- 和 -apple- 前綴的 CSS 屬性、Apple 系統字型宣告(如 .AppleSystemUIFont)和 WebKit 特定的文字渲染提示。段落樣式包含詳細的間距屬性,這些屬性只能在 Safari 或 WebKit 瀏覽器中正確渲染。
Apple Pages 輸出
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: '.AppleSystemUIFont';"><b>Introduction</b></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: '.AppleSystemUIFont';">This is a paragraph with <b>bold text</b> and <i>italic text</i>.</p>
乾淨的 HTML
<h2>Introduction</h2> <p>This is a paragraph with <strong>bold text</strong> and <em>italic text</em>.</p>
直接貼上效果不好。Pages 的 HTML 包含 Apple 特定的字型族和 WebKit CSS 屬性,在非 Safari 瀏覽器中會有不同的渲染效果。建議先用 Publish Helper 清理,以獲得一致的跨瀏覽器效果。
Pages 預設使用 macOS 系統字型,在 HTML 中以 .AppleSystemUIFont 引用。Windows 或 Linux 瀏覽器無法識別這個字型名稱,會回退到通用字型。Publish Helper 會移除這些宣告。
可以。從 iPad 上的 Pages 複製,在 Safari 或任何行動瀏覽器中開啟 Publish Helper,貼到編輯器中,然後清理 HTML。此工具完全在瀏覽器中運作,支援任何裝置。
Last updated: March 2026