Saturday, March 11, 2023
HomeCSShtml - Container inquiry devices in dimensions associate picture tag not functioning

html – Container inquiry devices in dimensions associate picture tag not functioning


When making use of container inquiry size (cqw) in the dimensions characteristic of a photo tag the wrong picture variant is asked for.

<< design>>.
div {
container-type: inline-size;
size: 100px;
}

img {
size: 100%;
elevation: car;.
}
<.
<< div>>.
<< img dimensions=" 100cqw" srcset="
https://via.placeholder.com/100 100w,.
https://via.placeholder.com/400 400w,.
https://via.placeholder.com/1000 1000w.
"/>>.
<

When running this code you will certainly see that the 1000w variant is asked for. While you would certainly anticipate that 100w or 400w to be asked for (depending upon your display DPI), since the container has a size of 100px.

Does somebody recognize if container inquiry size is sustained by the dimensions associate?

RELATED ARTICLES

Most Popular

Recent Comments