Generador CSS Grid gratuito
El Generador CSS Grid construye un diseño de cuadrícula visualmente. Define el número de columnas y filas, ajusta el tamaño igual o automático y establece los espacios, luego copia el CSS generado y una vista previa en vivo.
The one-dimensional alternative is the CSS Flexbox Generator, and the spacing units are handled by the PX to REM / EM Converter and PX to VW / VH Converter. For the breakpoints between layouts, the Screen Resolution Checker reports the viewport sizes to target.
Cómo usar Generador Grid
- 1 Set the number of columns and rows.
- 2 Choose fixed, fractional or auto sizing for each track.
- 3 Set the gap and decide how items should place themselves.
- 4 Copy the generated declarations.
Cómo usarlo
Elige columnas, filas y espacio, luego selecciona cómo deben dimensionarse las pistas. La vista previa llena la cuadrícula con celdas de muestra y el CSS exacto se escribe debajo.
- Define el número de columnas y filas
- Fracciones iguales o pistas de tamaño automático
- Espacios de fila y columna ajustables
- Vista previa de celdas en vivo
- Copia el CSS generado
Preguntas frecuentes
What does a fractional unit mean?
The `fr` unit represents a share of the free space in the grid after fixed tracks and gaps are accounted for. Two columns sized one fractional unit each will be equal, and a column of two fractional units will be twice as wide as one of them. It is what makes grids respond to available space without media queries.
What is the difference between `auto-fill` and `auto-fit`?
Both create as many tracks as will fit. `auto-fill` keeps empty tracks, so items stay their intended size and the row has empty space at the end. `auto-fit` collapses empty tracks to zero, so the remaining items stretch to fill the row. Which you want depends on whether you would rather items be larger or stay consistent.
When should I use a grid rather than flexbox?
When the layout has to align in two dimensions. A row of cards where the cards must be the same height is a grid problem, because grid rows align across columns by construction. Alignment in both axes is what grid is for, and flexbox is not a substitute for it.
Herramientas para desarrolladores relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con Generador Grid: