自适应两栏布局

    技术2025-06-04  31

    一、BFC

    结构 <aside></aside> <section></section> aside{ width: 200px; min-height: 400px; background: lightskyblue; float: left; } section{ min-height: 500px; background: lightsteelblue; overflow: hidden; }

    二、calc函数

    结构 <aside></aside> <section></section> aside{ width: 200px; min-height: 400px; background: lightskyblue; float: left; } section{ width: calc(100% - 200px); min-height: 500px; background: lightsteelblue; float: left; }
    Processed: 0.011, SQL: 9