<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.a1{
width: 100%;
height: 100px;
display: flex;
flex-direction: row;
align-items: center;
border: 1px solid red
}
.left{
-webkit-flex-basis: 100px;
height: 100%;
background-color: silver;
}
.right{
flex-grow: 1;
background-color: pink;
height: 100%;
}
.left1{
float: left;
width: 100px;
height: 100px;
background-color: aqua;
}
.right1{
两个div左右铺满整个浏览器,左边宽度固定,右边随浏览器变化而变化
最新推荐文章于 2024-07-14 11:54:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)