<figure>
<img src="https://picsum.photos/300/200
" alt="" />
</figure>
<figure>
<img src="https://picsum.photos/300/200
" alt="" />
<figcaption>Photo by <a href="https://picsum.photos/">Lorem Picsum</a></figcaption>
</figure>
figure:has(figcaption:not(:empty)) {
padding: 15px;
background-color: #fff;
box-shadow: 0 3px 5px 1px rgba(0,0,0, 0.075);
border-radius: 10px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.