<section class='container'></section>
:root {
    --border-repeat: stretch;
    --border-style: ridge;
    --border-image-slice: 10%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-wrap: wrap;
    background-color: lightgray;
}
section{
    text-align: center;
    display: flex;
    width: 10rem;
    flex-wrap: nowrap;
    padding: 2rem;
    height: 10rem;
    align-items: center;
    justify-content: center;
}
.container {
    font-family: Georgia, 'Times New Roman', Times, serif;
    border-image-source: url('https://img.freepik.com/free-vector/flat-abstract-doodle-background_23-2149316038.jpg?w=740&t=st=1669242621~exp=1669243221~hmac=19ab953f7b48afa6762aac4f52fb20f752ca65366bb4ef737e05bc8ca2643628');
    border-image-slice: var(--border-image-slice);
    border-image-repeat: var(--border-repeat);    
    border-width: 2.5rem;
    border-color: grey;
    border-style: var(--border-style);
    transition: all 0.3s ease;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.