我用的div+css布局,想實現(xiàn)左側(cè)固定長度,右側(cè)填滿。雖然是實現(xiàn)了,但是右側(cè)溢出,因為顯示左側(cè),使用margin-left導致右側(cè)出去了那么多。怎么處理?。?
1 回答

吃雞游戲
TA貢獻1829條經(jīng)驗 獲得超7個贊
.stage{
width: 100%;
height: 280px;
display: flex;
flex-direction: row;
flex-flow: nowrap;
}
.left{
width: 450px;
height: 100%;
background: orange;
}
.center{
width: calc(100% - 450px + 15px);
margin-left: 15px;
height: 100%;
background: grey;
}
試一下這樣布局吧 應(yīng)該是你想要的結(jié)果
添加回答
舉報
0/150
提交
取消