方案1:使用flex来布局
.box{ width: 100%; height: 100px; display: flex;}.d1{ flex-grow: 1; flex-shrink: 1;}.d2{ flex-basis: 1080px; background-color: pink; flex-grow: 0; flex-shrink: 0;}.d3{ flex-grow: 1; flex-shrink: 1;}
本文共 335 字,大约阅读时间需要 1 分钟。
.box{ width: 100%; height: 100px; display: flex;}.d1{ flex-grow: 1; flex-shrink: 1;}.d2{ flex-basis: 1080px; background-color: pink; flex-grow: 0; flex-shrink: 0;}.d3{ flex-grow: 1; flex-shrink: 1;}
转载于:https://www.cnblogs.com/PeriHe/p/8277611.html