问答详情
源自:7-3 圣杯布局的解决方案

用第三种方案似乎也可以实现 而且简单

<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>


提问者:杨超越赐我offer 2019-12-13 15:57

个回答

  • CullenMarcel
    2019-12-16 16:13:21

    这年头怎么会用id来写样式?