freeCodeCamp/guide/chinese/certifications/responsive-web-design/css-grid/create-grids-within-grids/index.md

31 lines
771 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Create Grids within Grids
localeTitle: 在网格中创建网格
---
## 在网格中创建网格
网格内的网格与任何其他网格相同。
1. 把一个元素嵌入另一个元素中,
2. 将它们_都_设置为网格
3. 和_POOF_ !你有一个网格内的网格。
### 嵌套元素
对于任何复习,嵌套元素如下所示: \`
这是你的网格
这是你的嵌套网格
\`
### 将元素设置为网格
之后调整以下CSS属性 \`.gridElement { / \*这给你一个网格\* / 显示:网格; }
.nestedGridElement { / \*这给你一个NESTED网格\* / 显示:网格; }\`
### 附加信息
之后,您可以随意自定义您的网格。 即`grid-template-columns: auto 1fr;`可能在嵌套网格中看起来不错。