Javascript JSTree CSS设置
在我的项目中,我在引导布局中使用JSTree。现在,我想让JSTree成为它所放置的容器的100%。为此,我使用:Javascript JSTree CSS设置,javascript,bootstrap-4,jstree,Javascript,Bootstrap 4,Jstree,在我的项目中,我在引导布局中使用JSTree。现在,我想让JSTree成为它所放置的容器的100%。为此,我使用: .container{ max-width: 100% !important; width:100%; } .casetree{ margin:0px; padding:0px; display:block; width:100%; height:100%; overflow:scroll; border-s
.container{
max-width: 100% !important;
width:100%;
}
.casetree{
margin:0px;
padding:0px;
display:block;
width:100%;
height:100%;
overflow:scroll;
border-style: solid;
border-width: 1px;
border-color: lightgrey;
border-radius: 2px;
}
但是如果我使用这种CSS样式,JSTree将根据其内容而不是放置在其中的容器更改其大小。有什么建议说明为什么会发生这种情况吗
我使用jstree的html
<div class="container">
<!-- Erste Reihe mit Optionen und Tree -->
<div class="row">
<!-- Linke Spalte -->
<div class="col-8" style="margin:0px;padding:0px;" >
<div id="myTree" class="casetree"></div>
</div>
<!-- /END Linke Spalte -->
<!-- Rechte Spalte -->
<div class="col-4">
test
</div>
<!-- /END Rechte Spalte -->
</div>
</div>
测试
你能显示你的HTML吗?用更多信息更新了问题,包括
col-8
&col-4
有效的引导类。。。您还可以将您的id=“myTree”
放在其上方的div
上。它不必嵌套。