Edit This Code:
<!DOCTYPE html>
<html>
<head>
<style>div {
    border: 15px solid transparent;
    padding: 15px;
    border-image: url("border.png");
    border-image-slice: 30;
    border-image-repeat: round;
    }

</style>
</head>
<body>

<div id="main">
  <h1>Hello</h1>
</div>

<p>Click the "Try it" button to change the value of the borderImageSlice property.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementById("main").style.borderImageSlice = "30%";
}
</script>

<p><b>Note:</b> Internet Explorer 10, and earlier versions, do not support the border-image property.</p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy