2 回答
TA贡献1799条经验 获得超9个赞
用这个CSS修复它
.calendar-container{
background-color:rgb(151,203,228);
height:100vh;
overflow: scroll;
overflow-x: hidden;
display:flex;
justify-content: center;
}
.fieldsContainer{
width:90%;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
grid-auto-rows: 20px;
}
.cube-lived{
float: left;
border: 1px solid rgba(0, 0, 0, .2);
margin: 1px;
background-color: rgba(6,30,57);
}
TA贡献1827条经验 获得超4个赞
尝试使用CSS网格
display: grid;
.fieldsContainer{
width:90%;
display: grid;
grid-template-columns: repeat(auto-fit, 20px);
grid-gap: 1px;
}
.cube-lived {
background-color: rgba(6,30,57);
height: 20px;
width: 20px;
}
- 2 回答
- 0 关注
- 107 浏览
添加回答
举报