我已经从Github(Template Link for reference)下载了ACE Master管理模板,该模板具有侧边栏代码。我试图使侧边栏固定,但是我的方法不起作用。然后,我尝试将这个div放在具有相同类的包装器中:sidebar,但是这停止了sidebar在移动视图上的工作。下面是代码:
<div id="sidebar" class="sidebar responsive ace-save-state">
<script type="text/javascript">
try{ace.settings.loadState('sidebar')}catch(e){}
</script>
<div class="sidebar-shortcuts" id="sidebar-shortcuts">
<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
</div>
<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
<span class="btn btn-success"></span>
<span class="btn btn-info"></span>
<span class="btn btn-warning"></span>
<span class="btn btn-danger"></span>
</div>
</div><!-- /.sidebar-shortcuts -->
<ul class="nav nav-list">
<li class="">
<a href="Dashboard">
<i class="menu-icon fa fa-tachometer"></i>
<span class="menu-text">Dashboard</span>
</a>
<b class="arrow"></b>
</li>
<li class="">
<a href="#" class="dropdown-toggle">
<i class="menu-icon fa fa-tag"></i>
<span class="menu-text">My Profile</span>
<b class="arrow fa fa-angle-down"></b>
</a>
<b class="arrow"></b>
<ul class="submenu">
<li class="">
<a href="Profile">
<i class="menu-icon fa fa-caret-right"></i>
Profile
</a>
<a href="Pdets">
<i class="menu-icon fa fa-caret-right"></i>
Pdets
</a>
<b class="arrow"></b>
</li>
</ul>
</li>
</ul><!-- /.nav-list -->
<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
<i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
</div>
</div>
我需要修复此边栏,以便在滚动页面时,边栏保持原样。但是,在移动视图上,它仍然有望成为弹出式导航栏。