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

来源:7-3 圣杯布局的解决方案

杨超越赐我offer

2019-12-13 15:57

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


写回答 关注

1回答

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

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

一课全面掌握主流CSS布局

一网打尽CSS主流布局方案,一步掌握页面布局技巧.

5276 学习 · 60 问题

查看课程

相似问题