URL Fragment Text Directives
URL 片段文字指令 API 允許 Web 應用程式與 URL 中的文字片段進行互動。文字片段允許直接連結到 Web 文件中的特定文字部分,而無需作者使用 URL 片段中的特定語法為其新增 ID。
介面
FragmentDirective-
一個(目前)為空的物件。此型別物件在
document.fragmentDirective中的存在用於特性檢測。
其他介面的擴充套件
Document.fragmentDirective-
一個屬性,返回當前文件的
FragmentDirective物件。目前僅用於特性檢測。
CSS 選擇器
::target-text-
表示已滾動到的文字。它允許作者選擇如何突出顯示該部分文字。
規範
| 規範 |
|---|
| URL Fragment Text Directives # dom-document-fragmentdirective |
| URL Fragment Text Directives # fragmentdirective |
| CSS 偽元素模組 Level 4 # selectordef-target-text |
瀏覽器相容性
api.Document.fragmentDirective
載入中…
api.FragmentDirective
載入中…
css.selectors.target-text
載入中…