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.