이동:

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

A grid area is one or more grid cells that make up a rectangular area on the grid. Grid areas are created when you place an item using line-based placement or when defining areas using named grid areas.

Image showing a highlighted grid area

Grid areas must be rectangular in nature; it is not possible to create, for example, a T- or L-shaped grid area.

In the example below I have a grid container with two grid items. I have named these with the grid-area property and then laid them out on the grid using grid-template-areas. This creates two grid areas, one covering four grid cells, the other two.

.wrapper {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  grid-template-rows: 100px 100px;
  grid-template-areas: 
    "a a b"
    "a a b";
}
.item1 {
  grid-area: a;
}
.item2 {
  grid-area: b;
}
<div class="wrapper">
   <div class="item1">Item</div>
   <div class="item2">Item</div>
</div>

Learn More

Property reference

Further reading

문서 태그 및 공헌자

태그: 
이 페이지의 공헌자: mdnwebdocs-bot, rachelandrew, teoli
최종 변경자: mdnwebdocs-bot,