grid-auto-flow 사용 속성은 자동 배치 항목이 그리드에 삽입되는 방식을 설정합니다. grid-auto-flow 속성을 구현하기 위해 다음 코드를 실행할 수 있습니다.
예시
<!DOCTYPE html>
<html>
<head>
<style>
.container {
display: grid;
grid-auto-columns: 50px;
grid-auto-flow: column;
grid-gap: 10px;
background-color: red;
padding: 10px;
}
.container>div {
background-color: yellow;
text-align: center;
padding:10px 0;
font-size: 20px;
}
</style>
</head>
<body>
<div class = "container">
<div class = "ele1">1</div>
<div class = "ele2">2</div>
<div class = "ele3">3</div>
<div class = "ele4">4</div>
<div class = "ele5">5</div>
<div class = "ele6">6</div>
</div>
</body>
</html>