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 關注
- 165 瀏覽
添加回答
舉報