div自动增加高度不起作用

时间:2016-06-18 10:04:50

标签: javascript html object

我已经尝试过这个项目,但在这个div扩大中有一些问题。我需要停止DIV滚动条并使用浏览器滚动条进行全高度滚动

home.php

<!DOCTYPE html>
<html>
<head>
    <title>Home</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<script type="text/javascript" src="funcition.js"></script>
<div id="header">This is Header Section</div>
<div id="sider"></div>
<div id="full_page">
    <object data="test.php"></object>
</div>
<div id="footer">This Is footer section</div>
</body>
</html>

的style.css

#footer
{
    position: absolute;
    bottom: 0px;
}
#bo
{
    width: 200px;
    height: 1000px;
    background-color: red;
}
#full_page
{
    position: absolute;
    overflow: auto;
    max-height: 1000px;
}

test.php的

<!DOCTYPE html>
<html>
<head>
    <title>Me</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<script type="text/javascript" src="funcition.js"></script>
<div id="bo"></div>
</body>
</html>

2 个答案:

答案 0 :(得分:0)

请尝试这种风格。

#footer { position: absolute; bottom: 0px; z-index:99; }
#bo { width: 200px; height: auto; background-color: red; }
#full_page { height:auto; }

答案 1 :(得分:0)

如果我对,答案很简单:

#full_page{
    height: auto;
    overflow:none;
}