用第三種方案似乎也可以實(shí)現(xiàn) 而且簡(jiǎn)單
<style>
????????#parent?{
????????????display:?table;
????????????width:?100%;
????????????table-layout:?fixed;
????????}
????????#left,
????????#center,
????????#right?{
????????????height:?300px;
????????}
????????#left?{
????????????border:?green?solid?1px;
????????????color:?green;
????????????width:?300px;
????????????display:?table-cell;
????????}
????????#center?{
????????????border:?hotpink?solid?1px;
????????????color:?hotpink;
????????????display:?table-cell;
????????}
????????#right?{
????????????border:?yellow?solid?1px;
????????????color:?yellow;
????????????width:?300px;
????????????display:?table-cell;
????????}
????</style>
2019-12-16
這年頭怎么會(huì)用id來寫樣式?