테두리 이미지가 확장되는 정도를 설정하려면 테두리 바깥쪽 테두리를 설정해야 합니다.
예시
다음 코드를 실행하여 JavaScript에서 테두리 이미지가 테두리 상자 너머로 확장되는 양을 설정하는 방법을 배울 수 있습니다.
<!DOCTYPE html>
<html>
<head>
<style>
div{
background-color:gray;
border: 40px solid;
border-image: url('https://www.tutorialspoint.com/images/neo4j.png');
border-image-slice: 50;
border-image-width: 20px;
border-image-width: 1 1 1 1;
border-image-outset: 0;
border-image-repeat: round;
}
</style>
</head>
<body>
<div id="box">
<p>Demo Text!</p>
</div>
<button onclick = "display()">Set Border Oustside Edges</button>
<script>
function display(){
document.getElementById("box").style.borderImageOutset = "5px 10px 20px 15px";
}
</script>
</body>
</html>