div+css布局问题?

我用的div+css布局,想实现左侧固定长度,右侧填满。虽然是实现了,但是右侧溢出,因为显示左侧,使用margin-left

https://img1.mukewang.com/5b8796970001f41205840375.jpghttps://img1.mukewang.com/5b8796a0000103ed03080470.jpghttps://img4.mukewang.com/5b8796a90001eba312080532.jpghttps://img4.mukewang.com/5b8796b40001885809110549.jpg





导致右侧出去了那么多。怎么处理啊?

婷婷同学_
浏览 621回答 1
1回答

吃鸡游戏

.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;}试一下这样布局吧 应该是你想要的结果
打开App,查看更多内容
随时随地看视频慕课网APP