Beispiel:Grid-ausrichtung-4.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche

<!doctype html> <html lang="de"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

 <title>Bildunterschrift auf Bild</title>
 <style>

.stacked {

   display: grid;

max-width: 50em; }

.stacked > * {

 grid-area: 1 / 1;

}


.stacked figcaption {

   align-self: end;

backdrop-filter: blur(3px); color: #fea; text-align: center; }

</style> </head>

<body>

Bildunterschrift auf Bild

<figure class="stacked"> <img src="https://wiki.selfhtml.org/images/d/dc/Landscape-2.svg" alt="placeholder"> <figcaption>

Abruzzen

Sonnenaufgang im Paradies

</figcaption> </figure>

</body> </html>