<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.use-float>div:first-child{
width:100px;
float:left;
background: red;
}
.use-float>div:last-child{
overflow:hidden;
background: yellow;
}
</style>
</head>
<body>
<div class="use-float">
<div>left</div>
<div>right</div>
</div>
</body>
</html>
css实现左边div固定宽度,右边div自适应撑满剩下的宽度
最新推荐文章于 2021-06-28 22:02:41 发布