2 回答

TA貢獻(xiàn)1799條經(jīng)驗(yàn) 獲得超9個(gè)贊
用這個(gè)CSS修復(fù)它
.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貢獻(xiàn)1827條經(jīng)驗(yàn) 獲得超4個(gè)贊
嘗試使用CSS網(wǎng)格
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 關(guān)注
- 181 瀏覽
添加回答
舉報(bào)