尿多是什么原因女性| 口五行属什么| 泌尿科主要看什么病| 镉是什么东西| 琮字五行属什么| 一什么树林| 什么什么千山| 查肝炎做什么检查项目| 龙跟什么生肖配对最好| 老年人吃饭老是噎着是什么原因| 梦见大蛇是什么预兆| 镀金什么意思| 欺山莫欺水是什么意思| 世界上最长的单词是什么| 正局级什么级别| 算了吧什么意思| 老年人便秘吃什么好| 肝囊肿有什么症状表现| 高烧不退是什么病毒| 总是打嗝是什么原因| 孕妇为什么不能吃韭菜| 女人练瑜伽有什么好处| feno是什么检查| ats是什么意思| 医生为为什么建议不吃生菜| 盆腔积液是什么原因引起的| 为什么总打喷嚏| 什么的四季| 名列前茅的茅是什么意思| 冬瓜烧什么好吃| 先敬罗衣后敬人是什么意思| 男人小便刺痛吃什么药| 小孩出虚汗是什么原因| 脸上长小疙瘩是什么原因| 僵尸为什么怕糯米| 青蟹什么季节吃最好| 测怀孕什么时候最准| 下午7点是什么时辰| 外感是什么意思| 大熊猫生活在什么地方| 更年期吃什么药调理| 生活因什么而精彩| 得艾滋病的人有什么症状| 什么水果通便| 银镯子变黑是什么原因| 甘草泡水喝有什么好处和坏处| 黄埔军校现在是什么学校| 见性成佛是什么意思| 眼底检查主要查什么| 黑色屎是什么原因| 做腹腔镜手术后需要注意什么| 乙肝25阳性什么意思| 前胸后背出汗多是什么原因| 甲鱼是什么| 什么茶降血脂最好| 吃生南瓜子有什么好处| 心肌炎查什么能查出来| 结婚十周年是什么婚| 婴儿奶粉过敏有什么症状| 什么时间英语| 晚上八点半是什么时辰| 吃什么蛋白质含量最高| 老年人晚上夜尿多是什么原因| alk是什么意思| perrier是什么水| 洋葱对肝脏有什么好处| 炖羊排放什么调料好吃| 折什么时候读she| 烧伤用什么药| 女人吃什么补气血效果最好| 隐翅虫吃什么| 什么人一年只工作一天| 8月26号是什么星座| 渐入佳境是什么意思| 厌恶是什么意思| 小王子讲了什么故事| 元旦唱什么歌| 晴纶是什么材质| 胆囊炎是什么| 梦见吃饭是什么意思| 服软是什么意思| 汉子婊什么意思| 什么时候立冬| 一什么网| 血府逐瘀丸治什么病| 文化底蕴是什么意思| 右耳朵痒是什么预兆| 什么花净化空气| 脚底发凉是什么原因| 豹纹守宫吃什么| 一月份什么星座| 八月七号是什么星座| 为什么叫打飞机| 秋葵是什么| 今年温度为什么这么高| 过敏性咳嗽用什么药| 老母鸡煲汤放什么食材补气补血| 睾丸瘙痒是什么原因| 硫酸是什么| 尿结石挂什么科| 大是什么意思| 印度什么教| 宝宝多吃什么蔬菜好| 金牛座和什么星座最不配| close是什么意思| 无锡有什么好玩的| 碱是什么东西| 成龙姓什么| 吃火龙果有什么好处和坏处| 天麻什么时候种植| 稍纵即逝什么意思| poscer是什么牌子| 咳嗽可以吃什么食物| 神经官能症是什么| 红楼梦什么朝代| 故事梗概是什么意思| 右眼皮跳什么预兆| 随喜赞叹是什么意思| 热辐射是什么| 沙门氏菌用什么药最好| 逍遥丸什么时候吃最好| 怡五行属性是什么| 什么是代词| 眉毛有什么作用| 查抗体是做什么检查| 丧门是什么意思| 运钞车押运员是什么人| 合肥有什么特产| 潜能什么意思| sch是什么意思| 肠胃不好吃什么比较好| 高血压应该吃什么| 一对什么| 云南有什么特产| 中医的精髓是什么| 地漏什么牌子的好| 鱼吃什么| 什么是rpa| 目翳是什么意思| 不寐病是什么意思| 梦见古墓是什么意思| 冲代表什么生肖| 万劫不复什么意思| bp是什么单位| 血糖高吃什么最好| 小青柑属于什么茶| 什么的眨眼| 三教九流代表什么生肖| 九转大肠是什么菜系| 为什么拔罐肩膀最黑| 动脉硬化是什么症状| 沅字五行属什么| 蝙蝠属于什么动物| g750和au750有什么区别| 吊瓜是什么瓜| 食之无味什么意思| 来月经有异味什么原因| 新生儿黄疸是什么原因引起的| 缀化是什么意思| peg是什么意思| 羊和什么生肖最配| 为什么今年闰六月| 什么是红颜知己| 什么是平年| 什么人不能吃蜂蜜| 侃侃而谈什么意思| 任字五行属什么| o型血与b型血生的孩子是什么血型| 免疫力低下吃什么好| 篦子是什么东西| air是什么牌子| 心肌缺血吃什么好| 兆上面是什么单位| 转氨酶高吃什么药最好| 核磁共振是什么| 盆底肌高张是什么意思| 生物科学是什么专业| 今年农历是什么年号| 吃葵花籽有什么好处和坏处吗| 耳机戴久了有什么危害| 第一次是什么感觉| 肾小球肾炎吃什么药| 怀孕不到一个月有什么症状| 三点水一个金读什么| 蛋清加蜂蜜敷脸有什么好处| dym是什么意思| 什么是卫校| 反酸烧心吃什么药效果好| 过期的维生素e有什么用途| 睡觉后腰疼是什么原因引起的| ganni是什么牌子| 男人做梦梦到蛇是什么意思| 狗为什么不吃饭| 上什么环最好最安全伤害小| 什么耳什么聋| 脾虚什么症状| 什么时候放假| 7月26日是什么日子| 什么杯子喝水最健康| 辩证是什么意思| 嗔心是什么意思| 巡视组组长什么级别| 寿命是什么意思| 行房时间短吃什么药| 蓝莓什么时候吃最好| 吃什么能提高记忆力| 促胃动力药什么时候吃| 天秤女和什么座最配对| 汗疱疹用什么药膏最好| 维生素b族为什么不能晚上吃| 难过美人关是什么生肖| 产妇能吃什么水果| 藿香正气水治疗什么病| 六月底是什么星座| 吃槟榔有什么好处| 尿里面有血是什么原因| 螺旋藻是什么东西| 吃什么补心| 肠易激综合征是什么原因造成的| 实相是什么意思| 永垂不朽的垂是什么意思| 1月5号什么星座| 口犬读什么| 罗汉果可以和什么一起泡水喝| 2025年是什么命| 舞蹈考级有什么用| 肚脐眼周围痛挂什么科| 乳腺增生吃什么药效果好| 耳后淋巴结肿大吃什么消炎药| 什么是三高| 四大发明是什么| 秋葵吃了有什么好处| 今天冲什么生肖| 2009属什么生肖| 开除公职是什么意思| 春天穿什么衣服| 一路卷风迎大年是什么生肖| 人造革是什么材质| 胃造影和胃镜有什么区别| 人为什么要吃肉| 生物钟是什么| 什么盐比较好| x表示什么| 什么是过敏体质| 生育津贴是什么| 户口所在地是什么意思| 长脓包是什么原因| 脸上长毛什么原因| 胆囊炎可以吃什么水果| 近视散光是什么意思| 1月14日什么星座| 枭神夺食会发生什么| 白麝香是什么味道| 什么样的轮子只转不走| 梦见捡钱了是什么预兆| 梦见好多动物是什么意思| 外阴瘙痒用什么药| 嗓子老有痰是什么原因| 麸子是什么东西| 尿胆原阳性是什么意思| 白色配什么颜色好看| 什么方法避孕最安全有效| 早搏吃什么药最好| 令坦是对方什么人的尊称| 百度
      1. 4.8.12 The map element
      2. 4.8.13 The area element
      3. 4.8.14 Image maps
        1. 4.8.14.1 Authoring
        2. 4.8.14.2 Processing model

4.8.12 The map element

Element/map

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android4+Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

HTMLMapElement

Support in all current engines.

Firefox1+Safari3+Chrome1+
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer5.5+
Firefox Android?Safari iOS1+Chrome Android?WebView Android?Samsung Internet?Opera Android12.1+
Categories:
Flow content.
Phrasing content.
Palpable content.
Contexts in which this element can be used:
Where phrasing content is expected.
Content model:
Transparent.
Tag omission in text/html:
Neither tag is omissible.
Content attributes:
Global attributes
name — Name of image map to reference from the usemap attribute
Accessibility considerations:
For authors.
For implementers.
DOM interface:
[Exposed=Window]
interface HTMLMapElement : HTMLElement {
  [HTMLConstructor] constructor();

  [CEReactions, Reflect] attribute DOMString name;
  [SameObject] readonly attribute HTMLCollection areas;
};

The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children.

The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no ASCII whitespace. The value of the name attribute must not be equal to the value of the name attribute of another map element in the same tree. If the id attribute is also specified, both attributes must have the same value.

map.areas

Returns an HTMLCollection of the area elements in the map.

The areas attribute must return an HTMLCollection rooted at the map element, whose filter matches only area elements.

Image maps can be defined in conjunction with other content on the page, to ease maintenance. This example is of a page with an image map at the top of the page and a corresponding set of text links at the bottom.

<!DOCTYPE HTML>
<HTML LANG="EN">
<TITLE>Babies?: Toys</TITLE>
<HEADER>
 <H1>Toys</H1>
 <IMG SRC="/images/menu.gif"
      ALT="Babies? navigation menu. Select a department to go to its page."
      USEMAP="#NAV">
</HEADER>
 ...
<FOOTER>
 <MAP NAME="NAV">
  <P>
   <A HREF="/clothes/">Clothes</A>
   <AREA ALT="Clothes" COORDS="0,0,100,50" HREF="/clothes/"> |
   <A HREF="/toys/">Toys</A>
   <AREA ALT="Toys" COORDS="100,0,200,50" HREF="/toys/"> |
   <A HREF="/food/">Food</A>
   <AREA ALT="Food" COORDS="200,0,300,50" HREF="/food/"> |
   <A HREF="/books/">Books</A>
   <AREA ALT="Books" COORDS="300,0,400,50" HREF="/books/">
  </P>
 </MAP>
</FOOTER>

4.8.13 The area element

Element/area

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

HTMLAreaElement

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer5.5+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android12.1+

HTMLAreaElement/rel

Support in all current engines.

Firefox30+Safari9+Chrome54+
Opera?Edge79+
Edge (Legacy)12+Internet Explorer11
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

HTMLAreaElement/relList

Support in all current engines.

Firefox30+Safari9+Chrome65+
Opera41+Edge79+
Edge (Legacy)18Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android41+
Categories:
Flow content.
Phrasing content.
Contexts in which this element can be used:
Where phrasing content is expected, but only if there is a map element ancestor.
Content model:
Nothing.
Tag omission in text/html:
No end tag.
Content attributes:
Global attributes
alt — Replacement text for use when images are not available
coords — Coordinates for the shape to be created in an image map
shape — The kind of shape to be created in an image map
href — Address of the hyperlink
targetNavigable for hyperlink navigation
download — Whether to download the resource instead of navigating to it, and its filename if so
pingURLs to ping
rel — Relationship between the location in the document containing the hyperlink and the destination resource
referrerpolicyReferrer policy for fetches initiated by the element
Accessibility considerations:
If the element has an href attribute: for authors; for implementers.
Otherwise: for authors; for implementers.
DOM interface:
[Exposed=Window]
interface HTMLAreaElement : HTMLElement {
  [HTMLConstructor] constructor();

  [CEReactions, Reflect] attribute DOMString alt;
  [CEReactions, Reflect] attribute DOMString coords;
  [CEReactions, Reflect] attribute DOMString shape;
  [CEReactions, Reflect] attribute DOMString target;
  [CEReactions, Reflect] attribute DOMString download;
  [CEReactions, Reflect] attribute USVString ping;
  [CEReactions, Reflect] attribute DOMString rel;
  [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList;
  [CEReactions] attribute DOMString referrerPolicy;

  // also has obsolete members
};
HTMLAreaElement includes HTMLHyperlinkElementUtils;

The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map.

An area element with a parent node must have a map element ancestor.

If the area element has an href attribute, then the area element represents a hyperlink. In this case, the alt attribute must be present. It specifies the text of the hyperlink. Its value must be text that, when presented with the texts specified for the other hyperlinks of the image map, and with the alternative text of the image, but without the image itself, provides the user with the same kind of choice as the hyperlink would when used without its text but with its shape applied to the image. The alt attribute may be left blank if there is another area element in the same image map that points to the same resource and has a non-blank alt attribute.

If the area element has no href attribute, then the area represented by the element cannot be selected, and the alt attribute must be omitted.

In both cases, the shape and coords attributes specify the area.

The shape attribute is an enumerated attribute with the following keywords and states:

Keyword Conforming State Brief description
circle Circle state Designates a circle, using exactly three integers in the coords attribute.
circ No
default Default state This area is the whole image. (The coords attribute is not used.)
poly Polygon state Designates a polygon, using at-least six integers in the coords attribute.
polygon No
rect Rectangle state Designates a rectangle, using exactly four integers in the coords attribute.
rectangle No

The attribute's missing value default and invalid value default are both the rectangle state.

The coords attribute must, if specified, contain a valid list of floating-point numbers. This attribute gives the coordinates for the shape described by the shape attribute. The processing for this attribute is described as part of the image map processing model.

In the circle state, area elements must have a coords attribute present, with three integers, the last of which must be non-negative. The first integer must be the distance in CSS pixels from the left edge of the image to the center of the circle, the second integer must be the distance in CSS pixels from the top edge of the image to the center of the circle, and the third integer must be the radius of the circle, again in CSS pixels.

In the default state, area elements must not have a coords attribute. (The area is the whole image.)

In the polygon state, area elements must have a coords attribute with at least six integers, and the number of integers must be even. Each pair of integers must represent a coordinate given as the distances from the left and the top of the image in CSS pixels respectively, and all the coordinates together must represent the points of the polygon, in order.

In the rectangle state, area elements must have a coords attribute with exactly four integers, the first of which must be less than the third, and the second of which must be less than the fourth. The four points must represent, respectively, the distance from the left edge of the image to the left side of the rectangle, the distance from the top edge to the top side, the distance from the left edge to the right side, and the distance from the top edge to the bottom side, all in CSS pixels.

When user agents allow users to follow hyperlinks or download hyperlinks created using the area element, the href, target, download, and ping attributes decide how the link is followed. The rel attribute may be used to indicate to the user the likely nature of the target resource before the user follows the link.

The target, download, ping, rel, and referrerpolicy attributes must be omitted if the href attribute is not present.

If the itemprop attribute is specified on an area element, then the href attribute must also be specified.

HTMLAreaElement/referrerPolicy

Support in all current engines.

Firefox50+Safari14.1+Chrome52+
Opera?Edge79+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

The IDL attribute referrerPolicy must reflect the referrerpolicy content attribute, limited to only known values.

4.8.14 Image maps

4.8.14.1 Authoring

An image map allows geometric areas on an image to be associated with hyperlinks.

An image, in the form of an img element, may be associated with an image map (in the form of a map element) by specifying a usemap attribute on the img element. The usemap attribute, if specified, must be a valid hash-name reference to a map element.

Consider an image that looks as follows:

A line with four shapes in it, equally spaced: a red hollow box, a green circle, a blue triangle, and a yellow four-pointed star.

If we wanted just the colored areas to be clickable, we could do it as follows:

<p>
 Please select a shape:
 <img src="shapes.png" usemap="#shapes"
      alt="Four shapes are available: a red hollow box, a green circle, a blue triangle, and a yellow four-pointed star.">
 <map name="shapes">
  <area shape=rect coords="50,50,100,100"> <!-- the hole in the red box -->
  <area shape=rect coords="25,25,125,125" href="red.html" alt="Red box.">
  <area shape=circle coords="200,75,50" href="green.html" alt="Green circle.">
  <area shape=poly coords="325,25,262,125,388,125" href="blue.html" alt="Blue triangle.">
  <area shape=poly coords="450,25,435,60,400,75,435,90,450,125,465,90,500,75,465,60"
        href="yellow.html" alt="Yellow star.">
 </map>
</p>
4.8.14.2 Processing model

If an img element has a usemap attribute specified, user agents must process it as follows:

  1. Parse the attribute's value using the rules for parsing a hash-name reference to a map element, with the element as the context node. This will return either an element (the map) or null.

  2. If that returned null, then return. The image is not associated with an image map after all.

  3. Otherwise, the user agent must collect all the area elements that are descendants of the map. Let areas be that list.

Having obtained the list of area elements that form the image map (the areas), interactive user agents must process the list in one of two ways.

If the user agent intends to show the text that the img element represents, then it must use the following steps:

  1. Remove all the area elements in areas that have no href attribute.

  2. Remove all the area elements in areas that have no alt attribute, or whose alt attribute's value is the empty string, if there is another area element in areas with the same value in the href attribute and with a non-empty alt attribute.

  3. Each remaining area element in areas represents a hyperlink. Those hyperlinks should all be made available to the user in a manner associated with the text of the img.

    In this context, user agents may represent area and img elements with no specified alt attributes, or whose alt attributes are the empty string or some other non-visible text, in an implementation-defined fashion intended to indicate the lack of suitable author-provided text.

If the user agent intends to show the image and allow interaction with the image to select hyperlinks, then the image must be associated with a set of layered shapes, taken from the area elements in areas, in reverse tree order (so the last specified area element in the map is the bottom-most shape, and the first element in the map, in tree order, is the top-most shape).

Each area element in areas must be processed as follows to obtain a shape to layer onto the image:

  1. Find the state that the element's shape attribute represents.

  2. Use the rules for parsing a list of floating-point numbers to parse the element's coords attribute, if it is present, and let the coords list be the result. If the attribute is absent, let the coords list be the empty list.

  3. If the number of items in the coords list is less than the minimum number given for the area element's current state, as per the following table, then the shape is empty; return.

    State Minimum number of items
    Circle state 3
    Default state 0
    Polygon state 6
    Rectangle state 4
  4. Check for excess items in the coords list as per the entry in the following list corresponding to the shape attribute's state:

    Circle state
    Drop any items in the list beyond the third.
    Default state
    Drop all items in the list.
    Polygon state
    Drop the last item if there's an odd number of items.
    Rectangle state
    Drop any items in the list beyond the fourth.
  5. If the shape attribute represents the rectangle state, and the first number in the list is numerically greater than the third number in the list, then swap those two numbers around.

  6. If the shape attribute represents the rectangle state, and the second number in the list is numerically greater than the fourth number in the list, then swap those two numbers around.

  7. If the shape attribute represents the circle state, and the third number in the list is less than or equal to zero, then the shape is empty; return.

  8. Now, the shape represented by the element is the one described for the entry in the list below corresponding to the state of the shape attribute:

    Circle state

    Let x be the first number in coords, y be the second number, and r be the third number.

    The shape is a circle whose center is x CSS pixels from the left edge of the image and y CSS pixels from the top edge of the image, and whose radius is r CSS pixels.

    Default state

    The shape is a rectangle that exactly covers the entire image.

    Polygon state

    Let xi be the (2i)th entry in coords, and yi be the (2i+1)th entry in coords (the first entry in coords being the one with index 0).

    Let the coordinates be (xi, yi), interpreted in CSS pixels measured from the top left of the image, for all integer values of i from 0 to (N/2)-1, where N is the number of items in coords.

    The shape is a polygon whose vertices are given by the coordinates, and whose interior is established using the even-odd rule. [GRAPHICS]

    Rectangle state

    Let x1 be the first number in coords, y1 be the second number, x2 be the third number, and y2 be the fourth number.

    The shape is a rectangle whose top-left corner is given by the coordinate (x1, y1) and whose bottom right corner is given by the coordinate (x2, y2), those coordinates being interpreted as CSS pixels from the top left corner of the image.

    For historical reasons, the coordinates must be interpreted relative to the displayed image after any stretching caused by the CSS 'width' and 'height' properties (or, for non-CSS browsers, the image element's width and height attributes — CSS browsers map those attributes to the aforementioned CSS properties).

    Browser zoom features and transforms applied using CSS or SVG do not affect the coordinates.

Pointing device interaction with an image associated with a set of layered shapes per the above algorithm must result in the relevant user interaction events being first fired to the top-most shape covering the point that the pointing device indicated, if any, or to the image element itself, if there is no shape covering that point. User agents may also allow individual area elements representing hyperlinks to be selected and activated (e.g. using a keyboard).

Because a map element (and its area elements) can be associated with multiple img elements, it is possible for an area element to correspond to multiple focusable areas of the document.

Image maps are live; if the DOM is mutated, then the user agent must act as if it had rerun the algorithms for image maps.

百度