<li class="list-group-item list-group-item-action text-light bg-primary" data-toggle="collapse" data-target="#service" class="collapsed">
<a href="#" class="text-light"><i class="fas fa-user-shield"></i> Admin</a>
</li>
<ul class="sub-menu collapse" id="service">
<li class="list-group-item list-group-item-action text-light bg-primary">
<a href="<?php echo base_url()?>admin/properties" class="text-light"><i class="fas fa-house-damage"></i> Property types</a></li>
<li class="list-group-item list-group-item-action text-light bg-primary"><a href="<?php echo base_url()?>admin/block" class="text-light"><i class="fas fa-warehouse"></i> Blocks</a></li>
<li class="list-group-item list-group-item-action text-light bg-primary"><a href="#" class="text-light"><i class="fas fa-satellite-dish"></i> Amenities</a></li>
<li class="list-group-item list-group-item-action text-light bg-primary"><a href="#" class="text-light"><i class="fas fa-user-shield"></i> Add Owner</a></li>
<li class="list-group-item list-group-item-action text-light bg-primary"><a href="#" class="text-light"><i class="fas fa-home"></i> Floors</a></li>
<li class="list-group-item list-group-item-action text-light bg-primary">
<a href="#" class="text-light"><i class="fas fa-info"></i> Managers Details</a></li>
</ul>
答案 0 :(得分:0)
在崩溃类中添加“ in”。刷新页面后,默认情况下会显示“子菜单”。当您单击列表项调用Admin时,折叠功能将起作用。
<ul class="sub-menu collapse in" id="service">
------
</ul>