aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/css/basic-shape
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/css/basic-shape
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/ko/web/css/basic-shape')
-rw-r--r--files/ko/web/css/basic-shape/index.html179
1 files changed, 179 insertions, 0 deletions
diff --git a/files/ko/web/css/basic-shape/index.html b/files/ko/web/css/basic-shape/index.html
new file mode 100644
index 0000000000..1697320804
--- /dev/null
+++ b/files/ko/web/css/basic-shape/index.html
@@ -0,0 +1,179 @@
+---
+title: <basic-shape>
+slug: Web/CSS/basic-shape
+tags:
+ - CSS
+ - CSS Date Type
+ - CSS Shapes
+ - Reference
+translation_of: Web/CSS/basic-shape
+---
+<div>{{CSSRef}}</div>
+
+<p><strong><code>&lt;basic-shape&gt;</code></strong> <a href="/ko/docs/Web/CSS">CSS</a> <a href="/ko/docs/Web/CSS/CSS_Types">자료형</a>은 {{cssxref("clip-path")}}, {{cssxref("shape-outside")}}, {{cssxref("offset-path")}} 속성이 사용할 형태를 정의합니다.</p>
+
+<div>{{EmbedInteractiveExample("pages/css/type-basic-shape.html")}}</div>
+
+
+
+<h2 id="구문">구문</h2>
+
+<p><code>&lt;basic-shape&gt;</code> 자료형은 아래의 기본 형태 함수 중 하나를 사용해 정의합니다.</p>
+
+<p>형태를 생성할 때, 형태의 기준 상자는 <code>&lt;basic-shape&gt;</code> 값을 사용하는 속성이 결정합니다. 형태의 좌표계는 기준 상자의 좌상단을 원점으로 하고, X축은 오른쪽, Y축은 아래쪽으로 나가게 됩니다. 백분율료 표현한 모든 길이는 기준 상자의 크기를 사용해 계산합니다.</p>
+
+<h3 id="형태_함수">형태 함수</h3>
+
+<p>다음의 형태를 지원합니다. 모든 <code>&lt;basic-shape&gt;</code> 값은 함수형 표기법을 사용하고, 여기서는 <a href="/ko/docs/Web/CSS/Value_definition_syntax">값 정의 구문</a>을 통해 정의합니다.</p>
+
+<dl>
+ <dt><code><a id="inset()" name="inset()"></a>inset()</code></dt>
+ <dd>
+ <pre class="syntaxbox"><code>inset( &lt;shape-arg&gt;{1,4} [round &lt;border-radius&gt;]? )</code></pre>
+
+ <p>인셋(inset) 사각형을 정의합니다.</p>
+
+ <p>매개변수 네 개를 모두 제공했을 땐 기준 상자의 상, 우, 하, 좌측 모서리에서 각각의 값만큼 안쪽으로 이동하여 인셋 사각형의 모서리를 구성합니다. 매개변수는 여백 단축 속성의 구분을 따르므로 네 모서리를 한 개, 두 개 등의 값만으로 정의할 수 있습니다.</p>
+
+ <p>선택적 {{cssxref("border-radius", "&lt;border-radius&gt;")}} 매개변수를 <code>border-radius</code> 단축 속성 구문을 사용해 지정하면 인셋 사각형의 모서리를 둥글게 만들 수 있습니다.</p>
+
+ <p>좌우 인셋 각각 75%처럼, 한 축의 인셋 쌍 값의 합이 요소가 차지하는 크기보다 큰 경우 면적 없는 형태를 정의합니다.</p>
+
+ <div class="hidden">
+ <p>For this specification, this results in an empty float area.</p>
+ </div>
+ </dd>
+ <dt><code><a id="circle()" name="circle()"></a>circle()</code></dt>
+ <dd>
+ <pre class="syntaxbox"><code><code><code>circle( [&lt;shape-radius&gt;]? [at &lt;position&gt;]? )</code></code></code></pre>
+
+ <p><code>&lt;shape-radius&gt;</code> 매개변수는 원의 반지름 <em>r</em>을 지정합니다. 음수는 유효하지 않습니다. 백분율 값을 사용하면 기준 상자의 너비와 높이를 공식 <code>sqrt(width^2+height^2)/sqrt(2)</code>에 대입한 결과가 최종 값이 됩니다.</p>
+
+ <p>{{cssxref("&lt;position&gt;")}} 매개변수는 원의 중심을 지정합니다. 생략할 경우 중앙을 기본값으로 사용합니다.</p>
+ </dd>
+ <dt><code><a id="ellipse()" name="ellipse()"></a>ellipse()</code></dt>
+ <dd>
+ <pre class="syntaxbox"><code><code><code>ellipse( [&lt;shape-radius&gt;{2}]? [at &lt;position&gt;]? )</code></code></code></pre>
+
+ <p><code>&lt;shape-radius&gt;</code> 매개변수는 타원의 X축, Y축 반지름인 r<sub>x</sub>와 r<sub>y</sub>를 순서대로 지정합니다. 두 값 모두 음수는 유효하지 않습니다. 백분율 값을 사용하면 기준 상자의 너비(r<sub>x</sub>)와 높이(r<sub>y</sub>)를 사용해 계산합니다.</p>
+
+ <p>{{cssxref("&lt;position&gt;")}} 매개변수는 타원의 중심을 지정합니다. 생략할 경우 중앙을 기본값으로 사용합니다.</p>
+ </dd>
+ <dt><code><a id="polygon()" name="polygon()"></a>polygon()</code></dt>
+ <dd>
+ <pre class="syntaxbox"><code>polygon( [&lt;fill-rule&gt;,]? [&lt;shape-arg&gt; &lt;shape-arg&gt;]# )</code></pre>
+
+ <p><code>&lt;fill-rule&gt;</code> represents the <a href="/en-US/docs/Web/SVG/Attribute/fill-rule">filling rule</a> used to determine the interior of the polygon. Possible values are <code>nonzero</code> and <code>evenodd</code>. Default value when omitted is <code>nonzero</code>.</p>
+
+ <p>Each pair argument in the list represents <em>x<sub>i</sub></em> and <em>y<sub>i</sub></em> - the x and y axis coordinates of the i<sup>th</sup> vertex of the polygon.</p>
+ </dd>
+ <dt><code><a id="path()" name="path()"></a>path()</code></dt>
+ <dd>
+ <pre class="syntaxbox"><code>path( [&lt;fill-rule&gt;,]? &lt;string&gt;)</code></pre>
+
+ <p>The optional <code>&lt;fill-rule&gt;</code> represents the <a href="/en-US/docs/Web/SVG/Attribute/fill-rule">filling rule</a> used to determine the interior of the path. Possible values are <code>nonzero</code> and <code>evenodd</code>. Default value when omitted is <code>nonzero</code>.</p>
+
+ <p>The required &lt;string&gt; is an <a href="/en-US/docs/SVG/Attribute/d">SVG Path</a> string encompassed in quotes</p>
+ </dd>
+</dl>
+
+<p>The arguments not defined above are defined as follows:</p>
+
+<pre class="syntaxbox"><code>&lt;shape-arg&gt; = &lt;length&gt; | &lt;percentage&gt;
+&lt;shape-radius&gt; = &lt;length&gt; | &lt;percentage&gt; | closest-side | farthest-side</code></pre>
+
+<p>Defines a radius for a circle or ellipse. If omitted it defaults to <code>closest-side</code>.</p>
+
+<p><code>closest-side</code> uses the length from the center of the shape to the closest side of the reference box. For circles, this is the closest side in any dimension. For ellipses, this is the closest side in the radius dimension.</p>
+
+<p><code>farthest-side</code> uses the length from the center of the shape to the farthest side of the reference box. For circles, this is the farthest side in any dimension. For ellipses, this is the farthest side in the radius dimension.</p>
+
+<h2 id="기본_형태의_계산값">기본 형태의 계산값</h2>
+
+<p>The values in a <code>&lt;basic-shape&gt;</code> function are computed as specified, with these exceptions:</p>
+
+<ul>
+ <li>Omitted values are included and compute to their defaults.</li>
+ <li>A {{cssxref("&lt;position&gt;")}} value in <code>circle()</code> or <code>ellipse()</code> is computed as a pair of offsets (horizontal then vertical) from the top left origin, each given as a combination of an absolute length and a percentage.</li>
+ <li>A <a href="/en-US/docs/Web/CSS/border-radius"><code>&lt;border-radius&gt;</code></a> value in <code>inset()</code> is computed as an expanded list of all eight {{cssxref("length")}} or percentage values.</li>
+</ul>
+
+<h2 id="기본_형태의_보간법">기본 형태의 보간법</h2>
+
+<p>When animating between one <code>&lt;basic-shape&gt;</code> and another, the rules below are applied. The values in the shape functions interpolate as a simple list. The list values interpolate as {{cssxref("&lt;length&gt;")}}, {{cssxref("&lt;percentage&gt;")}}, or {{cssxref("calc()")}} where possible. If list values are not one of those types but are identical, those values do interpolate.</p>
+
+<ul>
+ <li>Both shapes must use the same reference box.</li>
+ <li>If both shapes are the same type, that type is <code>ellipse()</code> or <code>circle()</code>, and none of the radii use the <code>closest-side</code> or <code>farthest-side</code> keywords, interpolate between each value in the shape functions.</li>
+ <li>If both shapes are of type <code>inset()</code>, interpolate between each value in the shape functions.</li>
+ <li>If both shapes are of type <code>polygon()</code>, both polygons have the same number of vertices, and use the same <code>&lt;fill-rule&gt;</code>, interpolate between each value in the shape functions.</li>
+ <li>If both shapes are of type <code>path()</code>, both paths strings have the same number and types of path data commands in the same order, interpolate each path data command as real numbers.</li>
+ <li>In all other cases no interpolation occurs.</li>
+</ul>
+
+<h2 id="예제">예제</h2>
+
+<h3 id="Animated_polygon">Animated polygon</h3>
+
+<p>In this example, we use the <a href="/en-US/docs/Web/CSS/@keyframes">@keyframes</a> at-rule to animate a clip path between two polygons. Note that both polygons have the same number of vertices, which is necessary for this type of animation to work.</p>
+
+<h4 id="HTML">HTML</h4>
+
+<pre class="brush: html">&lt;div&gt;&lt;/div&gt;</pre>
+
+<h4 id="CSS">CSS</h4>
+
+<pre class="brush: css">div {
+ width: 300px;
+ height: 300px;
+ background: repeating-linear-gradient(red, orange 50px);
+ clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
+ animation: 4s poly infinite alternate ease-in-out;
+ margin: 10px auto;
+}
+
+@keyframes poly {
+ from {
+ clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
+ }
+
+ to {
+ clip-path: polygon(50% 30%, 100% 0%, 70% 50%, 100% 100%, 50% 70%, 0% 100%, 30% 50%, 0% 0%);
+ }
+}</pre>
+
+<h4 id="결과">결과</h4>
+
+<p>{{EmbedLiveSample('Animated_polygon','340', '340')}}</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('CSS Shapes', '#basic-shape-functions', '&lt;basic-shape&gt;') }}</td>
+ <td>{{ Spec2('CSS Shapes') }}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_Compatibility" name="Browser_Compatibility">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("css.types.basic-shape")}}</p>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li><code>&lt;basic-shape&gt;</code>를 사용하는 속성: {{cssxref("clip-path")}}, {{cssxref("shape-outside")}}</li>
+ <li><a href="/en-US/docs/Tools/Page_Inspector/How_to/Edit_CSS_shapes">Edit Shape Paths in CSS — Firefox Developer Tools</a></li>
+</ul>