DIV溢出DataSrc隐藏滚动不起作用

时间:2011-06-23 16:24:17

标签: html overflow

确定。我遇到的问题是DIV没有隐藏dataSrc的overflow-x。如何隐藏overflow-x并滚动overflow-y

<style type="text/css">
#thediv { overflow-x:hidden; overflow-y:scroll; border:1px solid #BFBFBF; width:540; height:400px; }
</style>
<div id='thediv' dataSrc="page.php"></div>

2 个答案:

答案 0 :(得分:1)

封装到另一个div

<style type="text/css">
#wrapper { overflow-x:hidden; overflow-y:scroll; border:1px solid #BFBFBF; width:540; height:400px; }
</style>
<div id='wrapper'>
    <div id='thediv' dataSrc="page.php"></div>
</div>

答案 1 :(得分:0)

使用此:

overflow:auto

而不是

overflow-x:hidden; overflow-y:scroll;