目录 搜索
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
文字

已废弃

此功能已过时。虽然它可能在某些浏览器中仍然有效,但由于可以在任何时候删除它,所以不鼓励使用它。尽量避免使用。

非标准

这个功能是非标准的,不在标准上。不要在面向Web的生产站点上使用它:它不适用于每个用户。实现之间也可能存在大的不兼容性,并且行为在未来可能会改变。

HTML <image>元素是在时间的迷雾中丢失的古代HTML版本的过时残余; 改用标准<img>元素。严重的是,规范甚至在描述这个元素时甚至使用了“不要问”这个词。

不要使用这个!为了显示图像,使用标准<img>元素。

由于发生方式的多样化,虽然浏览器会尝试自动将其转换为<img>元素,但常常不这样做,并且在尝试时不会总是成功。所以如果你喜欢你的用户就不要使用它。

规范

这可能曾经是规范的一部分,但似乎没有人记得。当然不是了。只要避免它变得像瘟疫一样。

浏览器兼容性

一般来说,浏览器会尝试将其映射到<img>,但只有在src指定属性时也是如此。创建一个<image>没有src属性的元素会导致一个HTMLElement具有本地元素名称“image”的对象。但是,如果元素是使用src属性创建的,则结果是an,HTMLImageElement而其本地元素名称将更改为“img”。

但是,这并不意味着这是一个好主意。不是。

Feature

Chrome

Edge

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

?

?

(Yes)1

?

?

?

Feature

Android

Edge

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

?

?

(Yes)1

?

?

?

上一篇: 下一篇: