我用的div+css布局,想实现左侧固定长度,右侧填满。虽然是实现了,但是右侧溢出,因为显示左侧,使用margin-left导致右侧出去了那么多。怎么处理啊?
1 回答

吃鸡游戏
TA贡献1829条经验 获得超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;
}
试一下这样布局吧 应该是你想要的结果
- 1 回答
- 0 关注
- 622 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消