tabindex

Baseline 已廣泛支援

此功能已成熟,可在許多裝置和瀏覽器版本上正常執行。自 ⁨2017 年 1 月⁩ 起,各大瀏覽器均已支援。

tabindex 屬性可讓您控制元素是否可聚焦,並定義元素在順序聚焦導航中的相對順序。

您可以將此屬性與任何 SVG 元素一起使用。

示例

html
<?xml version="1.0"?>
<svg viewBox="0 0 260 260" xmlns="http://www.w3.org/2000/svg">
  <circle r="10" tabindex="0" fill="green" cx="60" cy="60" />
  <circle r="40" tabindex="0" fill="red" cx="60" cy="160" />
  <circle r="60" tabindex="0" fill="blue" cx="160" cy="60" />
  <circle r="20" tabindex="0" fill="black" cx="160" cy="160" />
</svg>

用法說明

有效整數
預設值 None
可動畫的
有效整數

元素在順序聚焦導航中的相對順序。

規範

規範
Scalable Vector Graphics (SVG) 2
# tabindex 屬性

瀏覽器相容性

另見