srcset property
The HTMLImageElement property
srcset is a string which identifies one or more
image candidate strings, separated using commas (,) each
specifying image resources to use under given circumstances.
Each image candidate string contains an image URL and an optional width or pixel density descriptor that indicates the conditions under which that candidate should be used instead of the image specified by the HTMLImageElement.src property.
The srcset property, along with the HTMLImageElement.sizes
property, are a crucial component in designing responsive websites, as
they
can be used together to make pages that use appropriate images for the
rendering
situation.
Note: If the
srcsetattribute uses width descriptors, thesizesattribute must also be present, or thesrcsetitself will be ignored.
Implementation
external String get srcset;
Implementation
external set srcset(String value);