两个div并排,右边的div需要铺满剩余空间?

horse_leo_zhcn horse_leo_zhcn 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
两个div并排,右边的div需要铺满剩余空间?该如何定义CSS


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title></title>
<%--<link rel="stylesheet" type="text/css" href="css/main.css">--%>
<style type="text/css">
.div1 {
background-color: lightseagreen;
width: 15%;
height: 100%;
float: left;
}

.div2 {
background-color: chocolate;
height: 100%;
float: left;
}
</style>
</head>
<body>
<div class="div1">
DIV1
</div>

<div class="div2">
DIV2
</div>
</body>
</html>


两个div并排,右边的div需要铺满剩余空间?该如何定义CSS
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
horse_leo_zhcn
CSS 61,116 成员 60,701 内容