ToolPal

CSS网格生成器

可视化设计CSS网格布局并即时复制生成的CSS代码。

容器属性

6 项目

预览

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6

生成的CSS

.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 16px;
  justify-items: stretch;
  align-items: stretch;
  justify-content: start;
  align-content: start;
}

使用方法

可视化设计CSS网格布局并即时复制生成的CSS代码。

  1. 1Set grid-template-columns using presets like repeat(3, 1fr) or enter a custom value.
  2. 2Configure grid-template-rows and gap to define row height and spacing.
  3. 3Adjust justify-items and align-items to control item placement within cells.
  4. 4Use justify-content and align-content to position the whole grid in its container.
  5. 5Add or remove items to preview different layouts, then copy the generated CSS.

主要功能

  • Column and row presets with custom input — use common grid patterns or enter any valid CSS value
  • Live visual preview — see exactly how your grid looks as you change properties
  • Full alignment control — configure justify-items, align-items, justify-content, and align-content
  • One-click CSS copy — get clean, ready-to-paste CSS with all seven grid properties

常见问题

了解更多