Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说CSS grid对齐网格项目和轨道[通俗易懂],希望能够帮助你!!!。
首先我们先将模块1关闭,模块2使用CSS网格
display: none;
.container--2 {
/* STARTER */
font-family: sans-serif;
background-color: black;
font-size: 40px;
margin: 100px;
width: 1000px;
height: 600px;
/* CSS GRID */
display: grid;
}
然后我们创建一个三列两行的网格
grid-template-columns: 125px 200px 125px;
grid-row: 250px 100px;
justify-content: center;
align-content: center;
justify-content: space-between;
align-content: center;
align-items: end;
align-items: end;
justify-items: center;
align-self: center;
justify-items: center;
上一篇
已是最后文章
下一篇
已是最新文章