javascript - 左側導航如何實現伸縮
問題描述
點擊按鈕然后變成:
這是用插件實現的嗎?要是用原生應該怎樣這個hover效果呢?
問題解答
回答1:這是adminlte的框架吧
原理就是用父節點的class來控制子節點的展示方式、
彈出的菜單就是你hover的子節點
https://adminlte.io/themes/Ad...
其實看看adminlte的代碼就知道了
<li class='active treeview menu-open'> <a href='http://m.cgvv.com.cn/wenda/4716.html#'><i class='fa fa-dashboard'></i> <span>Dashboard</span><span class='pull-right-container'> <i class='fa fa-angle-left pull-right'></i></span> </a> <ul class='treeview-menu'><li><a href='http://m.cgvv.com.cn/wenda/index.html'><i class='fa fa-circle-o'></i> Dashboard v1</a></li><li class='active'><a href='http://m.cgvv.com.cn/wenda/index2.html'><i class='fa fa-circle-o'></i> Dashboard v2</a></li> </ul> </li>
相關文章:
