<div class="framed">
<blockquote contenteditable="true">
Fighting for peace is like screwing for virginity
</blockquote>
<div class="tip">Grab my handle to resize me! 👉</div>
</div>
* {
box-sizing: border-box;
}
body {
height: 100dvh;
display: grid;
place-items: center;
font-family: "Roboto", "Lucida Sans Regular", "Lucida Grande",
"Lucida Sans Unicode", Geneva, Verdana, sans-serif;
background-color: darkseagreen;
}
.framed {
border-image-source: url("img/frame.png");
border-image-slice: 93 92 87 92;
border-image-repeat: stretch;
border-style: inset;
border-width: 60px;
background-color: #ffe;
margin-block-start: 2rem;
padding: 0.5rem;
display: grid;
row-gap: 2rem;
resize: both;
overflow: auto;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.3), 0 0 6px 0 rgba(0, 0, 0, 0.18);
}
blockquote {
margin: 0;
}
@keyframes pointing {
to {
transform: translateY(3px);
}
}
div {
height: min-content;
}
.tip {
padding-inline-end: 0.75rem;
justify-self: end;
align-self: end;
font-size: 0.7rem;
animation: 0.5s linear 0s infinite alternate pointing;
}
A blockquote
is surrounded by a gold ornate frame. Uses the border-image
CSS property to add the frame as slices of an image.
You can edit the blockquote or resize the blockquote with the handle to see the frame adapt to the new size of the element.