<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            #container{
                display: flex;
                width: 500px;
                border: 1px solid red;
            }
            #box1{
                background-color: mediumspringgreen;
                width: 100px;
                flex-grow: 0;
            }
            #box2{
                background-color: greenyellow;
                flex-grow: 1;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="box1">
                定宽
            </div>
            <div id="box2">
                填满
            </div>
        </div>
    </body>
</html>

 

相关文章:

  • 2021-12-14
  • 2022-02-01
  • 2021-11-20
  • 2021-11-28
  • 2021-08-16
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
相关资源
相似解决方案