CSS grid-auto-columns 속성
예시
그리드의 열에 대한 기본 크기를 설정합니다.
.grid-container {
display: grid;
grid-auto-columns: 50px;
}
정의 및 사용
속성 은 grid-auto-columns
그리드 컨테이너의 열 크기를 설정합니다.
이 속성은 크기가 설정되지 않은 열에만 영향을 줍니다.
기본값: | 자동 |
---|---|
상속: | 아니요 |
애니메이션 가능: | 예. 애니메이션 가능 에 대해 읽기 |
버전: | CSS 그리드 레이아웃 모듈 레벨 1 |
자바스크립트 구문: | 개체 .style.gridAutoColumns="120px" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
grid-auto-columns | 57 | 16 | 52 | 10 | 44 |
CSS 구문
grid-auto-columns: auto|max-content|min-content|length;
속성 값
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the columns is determined by the size of the container | |
fit-content() | ||
max-content | Sets the size of each column depending on the largest item in the column | |
min-content | Sets the size of each column depending on the smallest item in the column | |
minmax(min.max) | Sets a size range greater than or equal to min and less than or equal to max | |
length | Sets the size of the columns, by using a legal length value. Read about length units | |
% | Sets the size of the columns, by using a percent value |
관련 페이지
CSS 튜토리얼: CSS 그리드 레이아웃
CSS 참조: grid-auto-rows 속성