希望你们中的一个人知道这个问题的答案。
我有 2 个浮动 DIVS 和一个具有最小宽度的 DIV 容器内容。当我调整窗口大小并且窗口小于 min-width 内容时,内容会溢出父容器。
我希望父容器扩展以适应而不是让内部最小内容溢出并简单地在浏览器底部获取水平滚动条。
有谁知道解决方案?
<html>
<style>
.outer {
width:100%;
border:2px solid green;
position:relative;
}
.left {
float:left;
width:20%;
max-width:250px;
background:red;
}
.right {
float:left;
width:80%;
background:#eee;
}
.inner {
min-width:620px;
border:1px solid blue;
}
.clear {
clear:both;
}
</style>
<div class='outer'>
<div class='left'>This is an inner content page. This is an inner content page.This is an
inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.This is
an inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.</div>
<div
class='right'>
<div class='inner' class='clear'>This is an inner content page. This is an inner content page.This is an
inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.This is
an inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.</div>
<div class='inner' class='clear'>This is an inner content page. This is an inner content page.This is an
inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.This is
an inner content page.This is an inner content page.This is an inner content
page.This is an inner content page.This is an inner content page.</div>
</div>
<div style='clear:both'></div>
</div>
希望滚动条在展开时水平显示在浏览器窗口(而不是 DIV)上。