# repeat() 함수

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

`repeat()` 함수 또는 표기법(notation)을 사용하면 반복되는 값을 손쉽게 설정할 수 있습니다.

**예시**

```css
.grid-container {
  display: grid;
  /* repeat() 함수 사용법 */
  grid-template-rows: repeat(2, 1fr);         /* 1fr 1fr */
  grid-template-columns: repeat(3, 1fr 2fr);  /* 1fr 2fr 1fr 2fr 1fr 2fr */
}
```

![](/files/-LH6wr-_M5w25VP6iEhs)

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

![](/files/-LH6xDNiWm0149zthzWT)

{% embed url="<https://www.w3.org/TR/css-grid-1/#repeat-notation>" %}
w3.org/TR/css-grid-1/#repeat-notation
{% 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/repea-function.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.
