日期:2014-05-17  浏览次数:20965 次

DIV滚动条怎么替换成浏览器默认滚动条
http://www.duotin.com/
这是刚做的网站,中间内容用iframe控制,当点击 “加入我们” 菜单时,中间出现滚动条。
如何取消这个滚动条,换成浏览器的默认垂直滚动条,也就是让这个滚动条移动到最外层页面的最右边。
这问题搞半天了一直没效果,还请大家帮助指点指点,谢谢了。

------解决方案--------------------
<div style="width: 620px; height: 571px; padding-top: 24px; padding-left: 35px; overflow-y: auto;">
你这个div设置了高度了,把height设成100%试试
------解决方案--------------------

<div id="contentDiv" style="width:680px; height:100%; margin:0px auto 0px auto; z-index:2;">
            <iframe width="100%" height="100%" frameborder="0" name="myHtml" src="home_page.html" allowTransparency="true" scrolling="no">
            </iframe>
  </div>
---------------------------------
在 home_page.html中 
window.onload=function(){
   parent.document.getElementById("contentDiv").style.height=document.body.offsetHeight
}