怎样让Div高度自适应浏览器?

idiot_fox idiot_fox 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link type="text/css" href="index.css" rel="stylesheet" />
<title>Layout Test</title>
</head>
<body>
<div class="Left"></div>
<div class="Heading"></div>
<div class="Right">
<div class="Content"></div>
<div class="Content"></div>
<div class="Content"></div>
<div class="Content"></div>
<div class="Content"></div>
</div>

</body>
</html

body{
background-color: gold;
margin: 0 0 0 0px;
}
.Left{
width: 200px;
height: 100%;
background-color: blueviolet;
position: fixed;
left: 0px;
top: 0px;
z-index: 1;
}
.Heading{
width: 100%;
height: 100px;
background-color: blue;
position: fixed;
left: 200px;
top: 0px;
z-index: 0;
}
.Content{
width: 100%;
height: 200px;
margin-bottom: 50px;
background-color: aqua;
}
.Right{
width: 100%;
max-height: 630px;
position: relative;
top: 100px;
z-index: -1;
overflow-y: scroll;
}

怎样让Right的高度自适应浏览器(像Left一样)?无论content有多少全靠overflow来解决,只显示Right的滚动条。
...全文
评论 9
收藏 已收藏
分享
返回顶部
idiot_fox
CSS 61,117 成员 60,701 内容