| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 | <!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>Document</title>    <style>        /* 固定样式 */        body{            margin: 0;        }        .left{            width: 400px;            background-color: blue;        }        .left,.right{            height: 500px;        }        .right{            background-color: red;        }        /* 方法一flex */        /* .container{            display: flex;        }                .right{            flex-grow: 1;        } */        /* 方法二定位 */        /* .left{            position: absolute;            top:0;            left: 0;        }        .right{            margin-left: 400px;        } */        /* 方法三 calc */        /* .left{            float: left;        }        .right{            float: right;            width: calc( 100% - 400px);        } */        /* 方法四 maring*/        .container{            margin-left: 400px;        }        .right{            width: 100%;            float: left;            margin-left: -400px;        }        .left{            float: left;            position: relative;            left: -400px;        }    </style></head><body>    <div class="container">        <div class="left">left</div>        <div class="right">right</div>    </div></body></html>
 |