This article mainly shares with you how to implement menus and Tab pages based on the BootstrapAce template, interested friends can refer to this article to share the menu style and iframe-based Tab effect of using Ace templates in the project.
I. effect display
After a long time, I finally extracted the menu style and Tab Page effects from the project.
1. Initial loading results
2. expand the menu (multi-level expansion is supported, and the code will be introduced later)
3. click the sub-menu to open the corresponding page as a Tab
4. support menu folding
5. automatic line feed is displayed when the menu is opened for too many times and adaptive after folding
II. Sample code
There are ready-made things that are easy to use. In general, the Bootstrap Ace template is powerful and supports various terminal devices. This article mainly uses its menu effect. The following describes the implementation code of the Ace template menu effect.
1. menu effect
Ace is based on Bootstrap, so we need to reference jquery and bootstrap components first. let's take a look at the files it needs to reference.