borderImageRepeat 사용 이미지 테두리를 반복할지, 반올림할지, 늘일지를 설정하는 속성입니다.
예시
다음 코드를 실행하여 이미지 테두리를 반복할지, 둥글게 또는 늘릴지 설정하는 방법을 배울 수 있습니다. −
<!DOCTYPE html>
<html>
<head>
<style>
div{
background-color: blue;
border: 30px solid;
border-image: url('https://www.tutorialspoint.com/html5/images/html5-mini-logo.jpg');
border-image-slice: 10 10 30 30;
border-image-width: 1 1 1 1;
border-image-repeat: stretch;
}
</style>
</head>
<body>
<div id="box">
<p>
Demo Text!
</p>
</div>
<button onclick="display()">Click me!</button>
<script>
function display() {
document.getElementById("box").style.borderImageRepeat = "round";
}
</script>
</body>
</html>