# 순서 정렬

## 사용법 <a href="#usage" id="usage"></a>

`order` 속성을 사용하여 그리드 아이템을 순서에 따라 정렬 할 수 있습니다.

```css
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(50px, auto));
}

.item:nth-child(1) {
  /* 그리드 아이템 순서 설정 (자동 배치 내) */
  order: 2;
}
.item:nth-child(2) {
  order: 3;
}
.item:nth-child(3) {
  order: 1;
}
```

![](/files/-LH7ZWylIrlLm827MM7Y)

## 실습 <a href="#practice" id="practice"></a>

{% embed url="<https://codepen.io/yamoo9/pen/vjOGEd>" %}

## 레퍼런스 <a href="#reference" id="reference"></a>

![](/files/-LH7Za2x0M5IGdLwCYtI)

{% embed url="<https://www.w3.org/TR/css-grid-1/#order-property>" %}
w3.org/TR/css-grid-1/#order-property
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yamoo9.gitbook.io/css-grid/css-grid-guide/grid-items-layout/order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
