html - 我可以在 CSS Grid 中用作主网格容器吗?
问题描述
除了将所有内容都包装在 a 中之外<div>
,我可以只将 of 设置display
为<body>
togrid
吗?
<style>
.grid-container {
display: grid;
// Other grid stuff
}
</style>
…
<body>
<div class="grid-container">
<div class="header"></div>
<div class="other"></div>
</div>
</body>
对比
<style>
body {
display: grid;
// Other grid stuff
}
</style>
…
<body>
<div class="header"></div>
<div class="other"></div>
</body>
解决方案
推荐阅读
- api - 为什么 Chrome 的命令 API 没有响应?
- .net - 聊天组中的聊天审核(C# 自定义聊天应用)
- flutter - 当 Row 小部件在颤动中溢出时,是否可以使小部件不可见?
- flutter - Flutter 不能在 listtile 内递增,总是返回 0
- r - 通过分组变量聚合数据
- google-chrome - 在 Chrome 浏览器中,鼠标滚动在此页面上工作困难
- sql - SP2-0640:在 sqlplus 上未连接
- php - 不同语言的 Laravel 本地化搜索
- python - 过滤和排序列表提示问题 - Python3
- reactjs - 为什么即使添加 onChange 功能后我的输入字段也无法编辑 - 反应