承载dhtmlxtree的div设置了overflow但不见滚动条
在div中放置了一个dhtmlxtree,div的overflow设置为auto,加载完树后展开所有节点,树的宽度已经超过div的宽度了但是不出现滚动条:
<link type="text/css" href="css/dhtmlxtree.css" />
<script type="text/javascript" src="js/dhtmlxcommon.js"></script>
<script type="text/javascript" src="js/dhtmlxtree.js"></script>
<script type="text/javascript">
window.onload = function () {
var tree = new dhtmlXTreeObject("treeBox", "100%", "100%", 0);
tree.setImagePath("imgs/");
tree.enableCheckBoxes(true, true);
tree.enableTreeImages(false);
tree.loadXMLString("……");
}
</script>
<div id="treeBox" style="width:120px;height:200px; overflow:auto;background-color:#f5f5f5;"></div>