The vivacious young cow who lived in the hills, Longed for adventure, excitement and thrills. She was tired of the meadow, of chewing the grass. The other cows bored her, they didn't have class. So she jumped on a bus that was bound for the coast, And browsed through an atlas while nibbling some toast.
/* Mark the container as a query container */
.image-container {
container-type: inline-size;
}
/* When the container’s width is at least 500px, apply a max-width style to the image */
@container (min-width: 500px) {
.image-container img {
max-width: 80%;
height: auto;
}
}