如何使容器div 在 Firefox 中显示垂直滚动条(它适用于 Chrome,我不关心 IE*)?通过“制作”,我的意思是让它在不使用 JS 的情况下工作。
<html>
<head>
<title></title>
<style type="text/css">
.full-size { width: 100%; height: 100%; }
.full-height { height: 100%; }
.table { display: table; }
.table-row { display: table-row; }
.table-cell { display: table-cell; }
.thin-border { border: 1px solid gray; }
.border-box { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
.small-box { width: 50px; height: 50px; }
</style>
</head>
<body>
<div style="width: 400px; height: 200px; margin: 10px; border: 1px solid #ccc;">
<div class="full-size table">
<div class="table-row" style="height: 45px;">
<div class="table-cell">
<p>Test</p>
</div>
</div>
<div class="table-row full-height">
<div class="table-cell full-height" style="overflow: hidden;">
<div class="full-height" id="container" style="overflow-y: scroll;">
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
<div class="small-box">A</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>