HTMLAreaElement: shape 屬性

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2015 年 7 月⁩以來,各瀏覽器均已提供此特性。

HTMLAreaElement 介面的 shape 屬性用於指定影像對映區域的形狀。它反映了 <area> 元素的 shape 屬性。

一個字串;rect(矩形)、circle(圓形)或 poly(多邊形)。

示例

js
const areaElement = document.getElementById("imageMapArea");
console.log(areaElement.shape);

規範

規範
HTML
# dom-area-shape

瀏覽器相容性

另見