일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- TypingEffect
- dotenv
- innerHTML
- js
- for loop
- yet
- node
- Empty
- CSS
- nodeValue
- css:position
- innerText
- react
- UI
- beforeinput
- es6
- node.js
- modal
- HTML
- Event
- textContent
- Dom
- keyboardEvent
- Review
- javascript
- Temporal dead zone
- keyup
- a11y
- ES5
- addEventListener
- Today
- Total
the murmurous sea
CSS: Grid 본문
-
A grid-based layout system, with rows and columns. Like tables, grid layout enables an author to align elements into columns and rows.
-
CSS Grid Layout excels at dividing a page into major regions or defining the relationship in terms of size, position, and layer, between parts of a control built from HTML primitives.
-
Many more layouts are either possible or easier with CSS grid than they were with tables.
For example, a grid container's child elements could position themselves so they actually overlap and layer, similar to CSS positioned elements.
-
easier to design web pages without having to use floats and positioning.
-
An HTML element becomes a grid container when its display property is set to grid or inline-grid.
1. You can adjust the gap size by using one of the following properties:
- grid-column-gap
- grid-row-gap
- grid-gap
2. Place a grid item at column line 1, and let it end on column line 3
.item1 {
grid-column-start: 1;
grid-column-end: 3;
}
: combination with 'grid-row-start' and 'grid-row-end' can change the location of the item.
: shorten version
.wrapper {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
grid-auto-rows: minmax(100px, auto);
}
.one {
grid-column: 1 / 3;
grid-row: 1;
}
.two {
grid-column: 2 / 4;
grid-row: 1 / 3;
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout
https://www.w3schools.com/css/css_grid.asp
'#dev > 개념정리' 카테고리의 다른 글
Tree of nodes / DOM (0) | 2020.04.22 |
---|---|
HTML5: data- (0) | 2020.04.17 |
CSS: vertical alignment - centering (0) | 2020.04.15 |
HTML. semantic / non-semantic elements (0) | 2020.04.13 |
CSS. units (0) | 2020.04.13 |