<div class="row">
<div class="card">
<h2>Hello World</h2>
<p>Lorem ipsum dolor...</p>
</div>
</div>
body {
block-size: 100dvh;
font-family: system-ui;
background: hsla(0 0% 0% / .15);
}
.row {
padding: 1rem;
height: 100%;
display: grid;
place-items: center;
}
.card {
aspect-ratio: 2/3;
padding: 1.5rem;
box-shadow: 0 2px 4px rgba(0 0 0 / 0.2);
border-radius: 1.5rem;
display: flex;
flex-direction: column;
justify-content: end;
background: color-mix(in oklab, blue, white);
& h2 {
font-weight: 500;
margin: 0;
}
& p {
margin: .5em 0;
}
@media(width >= 50em) {
min-width: 16em;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.