--- title: paint-order slug: Web/CSS/paint-order tags: - CSS - Reference - SVG - Web - 'recipe:css-property' translation_of: Web/CSS/paint-order --- <div>{{CSSRef}}</div> <p><a href="/ko/docs/Web/CSS">CSS</a> <strong><code>paint-order</code></strong> 속성은 텍스트 및 모양의 채움 색과 테두리(마커 포함)를 그리는 순서를 지정합니다.</p> <h2 id="구문">구문</h2> <pre class="brush: css no-line-numbers notranslate">/* 일반 */ paint-order: normal; /* 단일 값 */ paint-order: stroke; /* draw the stroke first, then fill and markers */ paint-order: markers; /* draw the markers first, then fill and stroke */ /* 다중 값 */ paint-order: stroke fill; /* draw the stroke first, then the fill, then the markers */ paint-order: markers stroke fill; /* draw markers, then stroke, then fill */ </pre> <p>아무것도 지정하지 않았을 때의 기본값은 <code>fill</code>, <code>stroke</code>, <code>markers</code>입니다.</p> <p>하나의 값만 지정하면 그 값을 제일 먼저 그린 후, 기본값의 순서에 따라 나머지를 그립니다. 두 개를 지정하면 나머지 하나를 맨 나중에 그립니다.</p> <div class="note"> <p><strong>참고</strong>: 마커의 경우 <code>marker-*</code> 속성(<code><a href="/ko/docs/Web/SVG/Attribute/marker-start">marker-start</a></code> 등)과 <code><a href="/ko/docs/Web/SVG/Element/marker"><marker></a></code> 요소를 사용하는 SVG 모양의 경우에만 올바릅니다. HTML 텍스트는 이에 해당하지 않으므로 <code>stroke</code>와 <code>fill</code>의 순서만 정할 수 있습니다.</p> </div> <h3 id="값">값</h3> <dl> <dt><code>normal</code></dt> <dd>일반적인 그리기 순서를 사용합니다.</dd> <dt><code>stroke</code>,<br> <code>fill</code>,<br> <code>markers</code></dt> <dd>일부 항목 또는 모든 항목의 그리기 순서를 지정합니다.</dd> </dl> <h2 id="형식_정의">형식 정의</h2> <p>{{cssinfo}}</p> <h2 id="형식_구문">형식 구문</h2> {{csssyntax}} <h2 id="예제">예제</h2> <h3 id="테두리와_채움_색_순서_바꾸기">테두리와 채움 색 순서 바꾸기</h3> <h4 id="SVG">SVG</h4> <pre class="brush: html notranslate"><svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"> <text x="10" y="75">stroke in front</text> <text x="10" y="150" class="stroke-behind">stroke behind</text> </svg></pre> <h4 id="CSS">CSS</h4> <pre class="brush: css notranslate">text { font-family: sans-serif; font-size: 50px; font-weight: bold; fill: black; stroke: red; stroke-width: 4px; } .stroke-behind { paint-order: stroke fill; }</pre> <h4 id="결과">결과</h4> <p>{{EmbedLiveSample("테두리와_채움_색_순서_바꾸기", "100%", 165)}}</p> <h2 id="명세">명세</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("SVG2", "painting.html#PaintOrder", "paint-order")}}</td> <td>{{Spec2("SVG2")}}</td> <td>Initial definition.</td> </tr> </tbody> </table> <h2 id="브라우저_호환성">브라우저 호환성</h2> <p>{{Compat("css.properties.paint-order")}}</p>