您的位置:首页 > Web前端 > CSS

css实现左边div固定宽度,右边div自适应撑满剩下的宽度

2018-01-11 09:52 621 查看
<!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自适应
相关文章推荐