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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-wrap: wrap;
    background-color: #000000;
}
section{
    text-align: center;
    display: flex;
    width: 10rem;
    flex-wrap: nowrap;
    padding: 2rem;
    height: 10rem;
    justify-content: center;
}
.container {
    font-family: Georgia, 'Times New Roman', Times, serif;
    border-image-source: url('https://img.freepik.com/premium-vector/hand-painted-background-violet-orange-colours_23-2148427578.jpg?w=740');
    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;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.