<div class="box">
<p>У цьому прикладі, Ви можете змінювати значення для властивості <strong>border-image-source</strong>.</p>
<p>Вона встановлює шлях до зображення кордону.</p>
<strong>border-image-source: </strong>
<input type="text" class="input" id="source" value="https://lorempixel.com/150/150/">
<strong>;</strong>
</div>
* {
box-sizing: border-box;
}
body {
font-family: monospace;
font-size: 16px;
line-height: 1.45;
height: 100vh;
padding: 16px;
}
.box {
background-color: #f7f7f7;
padding: 16px;
border: 32px solid #444;
border-image: url(https://lorempixel.com/150/150/) 32 round round;
}
.input {
margin-bottom: 36px;
width: 275px;
}
#select {
position: relative;
top: -4px;
width: 100px;
}
$('.input').on('change', function() {
var source = $('#source').val();
$('.box').css( 'border-image-source', 'url('+source+')' );
});
This Pen doesn't use any external CSS resources.