Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ko]: Migrate CSS interactive examples #26299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion files/ko/web/css/accent-color/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,49 @@ l10n:

**`accent-color`** [CSS](/ko/docs/Web/CSS) 속성은 일부 요소에 의하여 생성된 사용자 인터페이스 컨트롤의 {{Glossary("accent", "강조")}} 색상을 설정합니다.

{{EmbedInteractiveExample("pages/css/accent-color.html")}}
{{InteractiveExample("CSS Demo: accent-color")}}

```css interactive-example-choice
accent-color: red;
```

```css interactive-example-choice
accent-color: #74992e;
```

```css interactive-example-choice
accent-color: rgb(255, 255, 128);
```

```css interactive-example-choice
accent-color: hsl(250, 100%, 34%);
```

```html interactive-example
<section class="default-example container" id="default-example">
<div>
<input checked="" id="example-element" type="checkbox" />
<label for="example-element" id="example-label">Example Label</label>
</div>
</section>
```

```css interactive-example
.container > div {
display: flex;
align-items: center;
}

#example-element {
width: 40px;
height: 40px;
}

#example-label {
margin-left: 10px;
font-size: x-large;
}
```

현재 `accent-color` 를 지원하는 브라우저에서는 다음 HTML 요소들에 이를 적용합니다.

Expand Down
46 changes: 45 additions & 1 deletion files/ko/web/css/align-content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,51 @@ slug: Web/CSS/align-content

아래의 대화형 예제는 그리드 레이아웃을 사용해 이 속성의 값을 시연합니다.

{{EmbedInteractiveExample("pages/css/align-content.html")}}
{{InteractiveExample("CSS Demo: align-content")}}

```css interactive-example-choice
align-content: start;
```

```css interactive-example-choice
align-content: center;
```

```css interactive-example-choice
align-content: space-between;
```

```css interactive-example-choice
align-content: space-around;
```

```html interactive-example
<section class="default-example" id="default-example">
<div class="example-container">
<div class="transition-all" id="example-element">
<div>One</div>
<div>Two</div>
<div>Three</div>
</div>
</div>
</section>
```

```css interactive-example
#example-element {
border: 1px solid #c5c5c5;
display: grid;
grid-template-columns: 60px 60px;
grid-auto-rows: 40px;
column-gap: 10px;
height: 180px;
}

#example-element > div {
background-color: rgba(0, 0, 255, 0.2);
border: 3px solid blue;
}
```

이 속성은 한 줄로만 이루어진 플렉스 컨테이너에는 아무 효과도 없습니다(`flex-wrap: nowrap` 등).

Expand Down
46 changes: 45 additions & 1 deletion files/ko/web/css/align-items/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,51 @@ l10n:

아래의 대화형 예제는 그리드 레이아웃을 사용하여 `align-items`의 속성 값을 시연합니다.

{{EmbedInteractiveExample("pages/css/align-items.html")}}
{{InteractiveExample("CSS Demo: align-items")}}

```css interactive-example-choice
align-items: stretch;
```

```css interactive-example-choice
align-items: center;
```

```css interactive-example-choice
align-items: start;
```

```css interactive-example-choice
align-items: end;
```

```html interactive-example
<section class="default-example" id="default-example">
<div class="example-container">
<div class="transition-all" id="example-element">
<div>One</div>
<div>Two</div>
<div>Three</div>
</div>
</div>
</section>
```

```css interactive-example
#example-element {
border: 1px solid #c5c5c5;
display: grid;
width: 200px;
grid-template-columns: 1fr 1fr;
grid-auto-rows: 80px;
grid-gap: 10px;
}

#example-element > div {
background-color: rgba(0, 0, 255, 0.2);
border: 3px solid blue;
}
```

## 구문

Expand Down
55 changes: 54 additions & 1 deletion files/ko/web/css/all/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,60 @@ slug: Web/CSS/all

[CSS](/ko/docs/Web/CSS) **`all`** [단축 속성](/ko/docs/Web/CSS/Shorthand_properties)은 요소의 {{cssxref("unicode-bidi")}}, {{cssxref("direction")}}, [CSS 사용자 지정 속성](/ko/docs/Web/CSS/Using_CSS_custom_properties)을 제외한 모든 속성을 초기화합니다. 초깃값, 상속값, 아니면 다른 스타일시트 출처의 값으로 설정할 수 있습니다.

{{EmbedInteractiveExample("pages/css/all.html")}}
{{InteractiveExample("CSS Demo: all")}}

```css interactive-example-choice
/*no all property*/
```

```css interactive-example-choice
all: initial;
```

```css interactive-example-choice
all: inherit;
```

```css interactive-example-choice
all: unset;
```

```css interactive-example-choice
all: revert;
```

```html interactive-example
<section id="default-example">
<div class="example-container-bg">
<div class="example-container">
<p id="example-element">
This paragraph has a font size of 1.5rem and a color of gold. It also
has 1rem of vertical margin set by the user-agent. The parent of the
paragraph is a &lt;div&gt; with a dashed blue border.
</p>
</div>
</div>
</section>
```

```css interactive-example
#example-element {
color: gold;
padding: 10px;
font-size: 1.5rem;
text-align: left;
width: 100%;
}

.example-container {
border: 2px dashed #2d5ae1;
}

.example-container-bg {
background-color: #77767b;
padding: 20px;
}
```

## 구문

Expand Down
36 changes: 35 additions & 1 deletion files/ko/web/css/angle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,41 @@ slug: Web/CSS/angle

[CSS](/ko/docs/Web/CSS) **`<angle>`** [자료형](/ko/docs/Web/CSS/CSS_Types)은 각도의 값을 도, 그레이드, 라디안 또는 회전수로 표현합니다. {{cssxref("&lt;gradient&gt;")}}나 일부 {{cssxref("transform")}} 함수에서 사용합니다..

{{EmbedInteractiveExample("pages/css/type-angle.html")}}
{{InteractiveExample("CSS Demo: &amp;lt;angle&amp;gt;")}}

```css interactive-example-choice
transform: rotate(45deg);
```

```css interactive-example-choice
transform: rotate(3.1416rad);
```

```css interactive-example-choice
transform: rotate(-50grad);
```

```css interactive-example-choice
transform: rotate(1.75turn);
```

```html interactive-example
<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
This box can rotate to different angles.
</div>
</section>
```

```css interactive-example
#example-element {
background-color: #0118f3;
padding: 0.75em;
width: 180px;
height: 120px;
color: white;
}
```

## 구문

Expand Down
101 changes: 100 additions & 1 deletion files/ko/web/css/animation-delay/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,106 @@ slug: Web/CSS/animation-delay

**`animation-delay`** [CSS](/ko/docs/Web/CSS) 속성은 애니메이션이 시작할 시점을 지정합니다. 시작 즉시, 잠시 후에, 또는 애니메이션이 일부 진행한 시점부터 시작할 수 있습니다.

{{EmbedInteractiveExample("pages/css/animation-delay.html")}}
{{InteractiveExample("CSS Demo: animation-delay")}}

```css interactive-example-choice
animation-delay: 250ms;
```

```css interactive-example-choice
animation-delay: 2s;
```

```css interactive-example-choice
animation-delay: -2s;
```

```html interactive-example
<section class="flex-column" id="default-example">
<div>Animation <span id="playstatus"></span></div>
<div id="example-element">Select a delay to start!</div>
</section>
```

```css interactive-example
#example-element {
background-color: #1766aa;
color: white;
margin: auto;
margin-left: 0;
border: 5px solid #333;
width: 150px;
height: 150px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

#playstatus {
font-weight: bold;
}

.animating {
animation-name: slide;
animation-duration: 3s;
animation-timing-function: ease-in;
animation-iteration-count: 2;
animation-direction: alternate;
}

@keyframes slide {
from {
background-color: orange;
color: black;
margin-left: 0;
}
to {
background-color: orange;
color: black;
margin-left: 80%;
}
}
```

```js interactive-example
"use strict";

window.addEventListener("load", () => {
const el = document.getElementById("example-element");
const status = document.getElementById("playstatus");

function update() {
status.textContent = "delaying";
el.className = "";
window.requestAnimationFrame(() => {
window.requestAnimationFrame(() => {
el.className = "animating";
});
});
}

el.addEventListener("animationstart", () => {
status.textContent = "playing";
});

el.addEventListener("animationend", () => {
status.textContent = "finished";
});

const observer = new MutationObserver(() => {
update();
});

observer.observe(el, {
attributes: true,
attributeFilter: ["style"],
});

update();
});
```

{{cssxref("animation")}} 단축 속성을 사용해 애니메이션 관련 속성을 편리하게 같이 지정할 수 있습니다.

Expand Down
Loading
Loading