📅  最后修改于: 2020-11-04 00:52:06             🧑  作者: Mango
标签定义了图像映射中与超链接相关联的可点击区域或活动区域。如果单击这些区域,它将执行一些操作,例如打开新图像,新URL等。此标记始终与
在图像图中,可以使用多个将不同区域超链接到各个位置单个元素
元素是使用(必需的)属性shape和coords定义的。 shape属性指定区域的形状,例如矩形,圆形,正方形和多边形。 coords属性定义图像内部区域的坐标。
图像映射被定义为具有活动区域的图形图像,因此当用户单击这些区域时,它可以链接到不同的目的地。要定义图像映射,我们需要执行以下操作:
以下是有关HTML的一些规范标签
Display | Block |
Start tag/End tag | Only start tag(End tag forbidden) |
Usage | Image Map |
HTML Area tag
Example of HTML Area tag
Attribute | Value | Description |
---|---|---|
alt | text | An alternative text String to display on the browser if it does not display the image. |
coords | x1,y1,x2,y2(rect) | Defines coordinates for the upper left and lower right of a rectangle. |
x,y, radius(circle) | Defines coordinates for the circle. | |
x1,y1,x2,y2,x3,y3,..(polygon) | Defines the polygon vertices. | |
href | href | URLIt determines the hyperlink destination for the active area. |
target | _blank | Open link in a new window |
_parent | Open link in the parent frame | |
_self | Open link in current window | |
_top | Open link with full width in the same window | |
frame_name | In the frame. (Not supported in HTML5) | |
shape | default | It defines the default area(rectangular). |
rect | It defines the rectangular area. | |
circle | Defines the circular area. | |
poly | Defines the polygonal. | |
download | filename | Defines that hyperlink, which is used for downloading the resource. |
rel | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag |
It defines the relationship between current and linked document. |
hreflang | language_code | It specifies the language of the linked resource. |
type | media_type | It specifies the MIME type of linked source.(Not supported in HTML5) |
标签支持HTML中的全局属性
标签支持HTML中的事件属性。
Element | Chrome | IE | Firefox | Opera | Safari |
Yes | Yes | Yes | Yes | Yes |