📅  最后修改于: 2020-11-04 00:48:26             🧑  作者: Mango
HTML
根据视口,将从不同的位置加载匹配的图像
此标记是HTML5中的新标记。
以下是有关HTML的一些规范
Display | Inline |
Start tag/End tag | Both Start and End tag |
Usage | Image |
Picture Tag
Example of picture tag
Resize the page to see the different versions of the images at different viewports, and as per viewport image will be automatically changed.
输出:
Attribute | Value | Description |
---|---|---|
media | media_query | It defines and accept any media query which can be defined in CSS. |
srcset | URL | It defines the URL of the image which can be used for different situations. (Required) |
type | video/ogg video/mp4 video/webM audio/ogg audio/mpeg |
It determines the MIME type |
src | URL | It specifies the location of the image. |
HTML
Element | Chrome | IE | Firefox | Opera | Safari |
Yes | No | Yes | Yes | Yes |