0

我的 html 页面中有两个部门,它们各自的 css

<html>
<head>
#lowerone
{position:absolute; bottom:25px; right:25px; height:300px; width:300px;}
#upperone
{position:absolute; bottom:25px; right:25px; height:300px; width:300px; overflow:scroll;}
</head>
<body>
<div id="lowerone">
</div>
<div id="upperone">
<img src="/bg.3.jpg" />
</div>
</body>
</html>

但是上面的 div 即 UPPERONE 是不可滚动的。如何使它可滚动?

4

2 回答 2

1

使用 2 个绝对定位的 div 相互重叠的任何具体原因?并且缺少更多<style>标签...滚动对我有用..

演示

于 2012-12-16T17:04:02.210 回答
0

检查下面的代码滚动工作,

<html>
<head>
    <style>
#lowerone
{position:absolute; bottom:25px; right:25px; height:250px; width:300px;overflow:scroll;}
#upperone
{position:absolute; bottom:25px; left:25px; height:250px; width:300px; overflow:scroll;}
    </style>
</head>
<body>
<div id="lowerone">
    <img src="http://media.caranddriver.com/images/12q4/477956/2014-gmc-sierra-1500-photos-and-info-news-car-and-driver-photo-492039-s-450x274-1.jpg" />
</div>
<div id="upperone">
<img src="http://media.caranddriver.com/images/12q4/477956/2014-gmc-sierra-1500-photos-and-info-news-car-and-driver-photo-492039-s-450x274-1.jpg" />
</div>
</body>
</html>

这是我的小提琴

于 2014-10-24T09:32:11.333 回答