---
title: border-image-repeat
slug: Web/CSS/border-image-repeat
tags:
  - CSS
  - CSS Borders
  - CSS Property
  - Reference
translation_of: Web/CSS/border-image-repeat
---
<div>{{CSSRef}}</div>

<p><strong><code>border-image-repeat</code></strong> <a href="/ko/docs/Web/CSS">CSS</a> 속성은 원본 이미지의 <a href="/ko/docs/Web/CSS/border-image-slice#edge_region">모서리 영역</a>을 요소의 <a href="/ko/docs/Web/CSS/border-image">테두리 이미지</a> 크기에 맞춰 조절할 때 사용할 방법을 지정합니다.</p>

<div>{{EmbedInteractiveExample("pages/css/border-image-repeat.html")}}</div>



<h2 id="구문">구문</h2>

<pre class="brush:css no-line-numbers">/* 키워드 값 */
border-image-repeat: stretch;
border-image-repeat: repeat;
border-image-repeat: round;
border-image-repeat: space;

/* 세로방향 | 가로방향 */
border-image-repeat: round stretch;

/* 전역 값 */
border-image-repeat: inherit;
border-image-repeat: initial;
border-image-repeat: unset;
</pre>

<p><code>border-image-repeat</code> 속성은 한 개 또는 두 개의 값을 사용해 지정할 수 있습니다.</p>

<ul>
 <li><strong>한 개의 값</strong>을 지정하면 <strong>모든 네 면</strong>이 같은 방식을 사용합니다.</li>
 <li><strong>두 개의 값</strong>을 지정하면, 첫 번째 값은 <strong>위와 아래</strong>, 두 번째 값은 <strong>왼쪽과 오른쪽 면</strong>의 방식을 지정합니다.</li>
</ul>

<h3 id="값">값</h3>

<dl>
 <dt><code>stretch</code></dt>
 <dd>원본 이미지의 모서리 영역을 늘리거나 줄여 간격을 채웁니다.</dd>
 <dt><code>repeat</code></dt>
 <dd>원본 이미지의 모서리 영역을 타일처럼 반복해 간격을 채웁니다. 크기가 맞지 않으면 마지막 이미지는 잘릴 수 있습니다.</dd>
 <dt><code>round</code></dt>
 <dd>원본 이미지의 모서리 영역을 타일처럼 반복해 간격을 채웁니다. 크기가 맞지 않으면 늘어나거나 줄어들 수 있습니다.</dd>
 <dt><code>space</code></dt>
 <dd>원본 이미지의 모서리 영역을 타일처럼 반복해 간격을 채웁니다. 크기가 맞지 않으면 각 타일에 균등하게 공백을 배치합니다.</dd>
</dl>

<h3 id="형식_구문">형식 구문</h3>

{{csssyntax}}

<h2 id="예제">예제</h2>

<h3 id="CSS">CSS</h3>

<pre class="brush: css; highlight[7]">#bordered {
  width: 12rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 40px solid;
  border-image: url("https://mdn.mozillademos.org/files/4127/border.png") 27;
  border-image-repeat: stretch;  /* 라이브 샘플에서 바꿀 수 있습니다 */
}
</pre>

<div class="hidden">
<h3 id="HTML">HTML</h3>

<pre class="brush: html">&lt;div id="bordered"&gt;저한테 다양한 테두리 반복 속성을 써보세요!&lt;/div&gt;

&lt;select id="repetition"&gt;
  &lt;option value="stretch"&gt;stretch&lt;/option&gt;
  &lt;option value="repeat"&gt;repeat&lt;/option&gt;
  &lt;option value="round"&gt;round&lt;/option&gt;
  &lt;option value="space"&gt;space&lt;/option&gt;
  &lt;option value="stretch repeat"&gt;stretch repeat&lt;/option&gt;
  &lt;option value="space round"&gt;space round&lt;/option&gt;
&lt;/select&gt;
</pre>

<h3 id="JavaScript">JavaScript</h3>

<pre class="brush: js">var repetition = document.getElementById("repetition");
repetition.addEventListener("change", function (evt) {
  document.getElementById("bordered").style.borderImageRepeat = evt.target.value;
});
</pre>
</div>

<p>{{EmbedLiveSample("예제", "auto", 200)}}</p>

<h2 id="Specifications" name="Specifications">명세</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Backgrounds', '#the-border-image-repeat', 'border-image-repeat')}}</td>
   <td>{{Spec2('CSS3 Backgrounds')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<div>{{cssinfo}}</div>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("css.properties.border-image-repeat")}}</p>