diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/css/background | |
parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip |
initial commit
Diffstat (limited to 'files/ko/web/css/background')
-rw-r--r-- | files/ko/web/css/background/index.html | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/files/ko/web/css/background/index.html b/files/ko/web/css/background/index.html new file mode 100644 index 0000000000..1fd697b1d8 --- /dev/null +++ b/files/ko/web/css/background/index.html @@ -0,0 +1,178 @@ +--- +title: background +slug: Web/CSS/background +tags: + - CSS + - CSS Background + - CSS Property + - Reference + - 'recipe:css-shorthand-property' +translation_of: Web/CSS/background +--- +<div>{{CSSRef("CSS Background")}}</div> + +<p><a href="/ko/docs/Web/API/CSS">CSS </a><strong><code>background</code> </strong><a href="/ko/docs/Web/CSS/Shorthand_properties">단축 속성</a>은 색상, 이미지, 원점, 크기, 반복 등 여러 배경 스타일을 한 번에 지정합니다.</p> + +<div>{{EmbedInteractiveExample("pages/css/background.html")}}</div> + + + +<h2 id="구성_속성">구성 속성</h2> + +<p><code>background</code>는 단축 속성으로서 다음의 하위 속성을 포함합니다.</p> + +<ul> + <li>{{cssxref("background-attachment")}}</li> + <li>{{cssxref("background-clip")}}</li> + <li>{{cssxref("background-color")}}</li> + <li>{{cssxref("background-image")}}</li> + <li>{{cssxref("background-origin")}}</li> + <li>{{cssxref("background-position")}}</li> + <li>{{cssxref("background-repeat")}}</li> + <li>{{cssxref("background-size")}}</li> +</ul> + +<h2 id="Syntax" name="Syntax">구문</h2> + +<pre class="brush: css notranslate">/* <background-color> 사용 */ +background: green; + +/* <bg-image>와 <repeat-style> 사용 */ +background: url("test.jpg") repeat-y; + +/* <box>와 <background-color> 사용 */ +background: border-box red; + +/* 단일 이미지, 중앙 배치 및 크기 조절 */ +background: no-repeat center/80% url("../img/image.png"); +</pre> + +<p><code>background</code> 속성을 쉼표로 구분해서 배경 레이어를 여러 개 지정할 수 있습니다.</p> + +<p>각 레이어의 구문은 다음과 같습니다.</p> + +<ul> + <li>각 레이어는 다음 값을 가지거나 가지지 않을 수 있습니다. + <ul> + <li><code><a href="#attachment"><attachment></a></code></li> + <li><code><a href="#bg-image"><bg-image></a></code></li> + <li><code><a href="#position"><position></a></code></li> + <li><code><a href="#bg-size"><bg-size></a></code></li> + <li><code><a href="#repeat-style"><repeat-style></a></code></li> + </ul> + </li> + <li><code><a href="#bg-size"><bg-size></a></code> 값은 <code><a href="#position"><position></a></code> 바로 뒤에만 위치할 수 있으며 '/' 문자로 구분해야 합니다. 예를 들면 "<code>center/80%</code>" 처럼 사용합니다.</li> + <li><code><a href="#box"><box></a></code> 값은 2개까지 가지거나 가지지 않을 수 있습니다. 1개 가진다면 {{cssxref("background-origin")}}과 {{cssxref("background-clip")}}을 모두 설정합니다. 2개 가진다면 처음 값은 {{cssxref("background-origin")}}, 두 번째 값은 {{cssxref("background-clip")}}을 설정합니다.</li> + <li><code><a href="#background-color"><background-color></a></code> 값은 마지막 레이어만 가질 수 있습니다.</li> +</ul> + +<h3 id="값"><a id="values" name="values">값</a></h3> + +<dl> + <dt><a id="attachment" name="attachment"><code><attachment></code></a></dt> + <dd>{{cssxref("background-attachment")}}</dd> + <dt><a id="box" name="box"><code><box></code></a></dt> + <dd>{{cssxref("background-clip")}}, {{cssxref("background-origin")}}</dd> + <dt><a id="background-color" name="background-color"><code><background-color></code></a></dt> + <dd>{{cssxref("background-color")}}</dd> + <dt><a id="bg-image" name="bg-image"><code><bg-image></code></a></dt> + <dd>{{Cssxref("background-image")}}</dd> + <dt><a id="position" name="position"><code><position></code></a></dt> + <dd>{{cssxref("background-position")}}</dd> + <dt><a id="repeat-style" name="repeat-style"><code><repeat-style></code></a></dt> + <dd>{{cssxref("background-repeat")}}</dd> + <dt><a id="bg-size" name="bg-size"><code><bg-size></code></a></dt> + <dd>{{cssxref("background-size")}}</dd> +</dl> + +<h2 id="접근성_고려사항">접근성 고려사항</h2> + +<p>브라우저는 배경 이미지에 대한 어떠한 추가 정보도 접근성 보조 기술에 제공하지 않습니다. 특히 스크린 리더의 경우 배경 이미지의 존재 유무조차 알려주지 않습니다. 이미지가 페이지 목적의 이해에 필수적인 정보를 갖고 있다면 문서에서 구조적으로 설명하는 편이 좋습니다.</p> + +<ul> + <li><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Perceivable#Guideline_1.1_%E2%80%94_Providing_text_alternatives_for_non-text_content">MDN Understanding WCAG, Guideline 1.1 explanations</a></li> + <li><a href="https://www.w3.org/TR/2016/NOTE-UNDERSTANDING-WCAG20-20161007/text-equiv-all.html">Understanding Success Criterion 1.1.1 | W3C Understanding WCAG 2.0</a></li> +</ul> + +<h2 id="형식_정의">형식 정의</h2> + +<p>{{cssinfo}}</p> + +<h2 id="형식_구문">형식 구문</h2> + +<pre class="syntaxbox notranslate">{{csssyntax}}</pre> + +<h2 id="예제">예제</h2> + +<h3 id="색상_키워드와_이미지를_사용한_배경">색상 키워드와 이미지를 사용한 배경</h3> + +<h4 id="HTML">HTML</h4> + +<pre class="brush: html notranslate"><p class="topbanner"> + 작은 별<br/> + 반짝 반짝<br/> + 작은 별 +</p> +<p class="warning">문단 하나<p></pre> + +<h4 id="CSS">CSS</h4> + +<pre class="brush: css notranslate">.warning { + background: pink; +} + +.topbanner { + background: url("https://mdn.mozillademos.org/files/11983/starsolid.gif") #99f repeat-y fixed; +}</pre> + +<h4 id="결과">결과</h4> + +<p>{{EmbedLiveSample("색상_키워드와_이미지를_사용한_배경")}}</p> + +<ul> +</ul> + +<h2 id="Notes" name="Notes">명세</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-background', 'background')}}</td> + <td>{{Spec2('CSS3 Backgrounds')}}</td> + <td>The shorthand property has been extended to support multiple backgrounds and the new {{cssxref("background-size")}}, {{cssxref("background-origin")}} and {{cssxref("background-clip")}} properties.</td> + </tr> + <tr> + <td>{{SpecName('CSS2.1', 'colors.html#propdef-background', 'background')}}</td> + <td>{{Spec2('CSS2.1')}}</td> + <td>No significant changes</td> + </tr> + <tr> + <td>{{SpecName('CSS1', '#background', 'background')}}</td> + <td>{{Spec2('CSS1')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_.ED.98.B8.ED.99.98.EC.84.B1" name="Browser_.ED.98.B8.ED.99.98.EC.84.B1">브라우저 호환성</h2> + + + +<p>{{Compat("css.properties.background")}}</p> + +<h2 id="See_Also" name="See_Also">같이 보기</h2> + +<ul> + <li>{{cssxref("box-decoration-break")}}</li> + <li><a href="/ko/docs/Web/CSS/CSS_Images/Using_CSS_gradients">CSS 그레이디언트 사용하기</a></li> + <li><a href="/ko/docs/Web/CSS/CSS_Backgrounds_and_Borders/Using_multiple_backgrounds">한 번에 여러 배경 사용하기</a></li> +</ul> + +<p><span class="comment">Categoria</span></p> |