“Сетка-Template-Columns” Ответ

CSS GRID повтор

repeat(/*Number of repeats*/, /*Code to be repeated*/)

.gridContainer {
	grid-template-columns: repeat(4, 100px); /*Creates 4 columns, each 100px in width*/
	grid-template-rows: repeat(2, 250px); /*Creates 2 rows, each 250px in height*/
}
Soulless Creature

Сетка-Template-Columns

/* giving container class grid will not work we have to give rows and columns 
 1fr means taking 1 part of available space.*/
.container{
display:grid;
grid-template-rows: 150px 150px;
grid-template-columns:1fr 1fr 1fr ; /* container contain 6 items inside it*/
/* in short we can also use repeat function */
grid-template-columns:repeat(3 ,1fr);
grid-template-columns:50% repeat(2,1fr); /*it means first column will take 50% and other 2 50% */
}
Shirshak kandel

Сетка-Template-Columns

grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
caudatam daktula

Смотреть популярные ответы по языку

Смотреть другие языки программирования