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

浏览器兼容性

另见