First https://github.com/VPenkov/okayNav this site to download the code inside
Unpacked after downloading it, unzip the file to open the app
Then create an HTML document
Then pour css styles
style:
Code:
Then pour js file
Code:
Then the text is added in front of the code:
1 <header id="header"> 2 <a class="site-logo" href="#"> 3 Logo 4 </a> 5 6 <nav role="navigation" id="nav-main" class="okayNav"> 7 <ul> 8 <li><a href="#">Home</a></li> 9 <li><a href="#">Shop</a></li> 10 <li><a href="#">Blog</a></li> 11 <li><a href="#">Services</a></li> 12 <li><a href="#">Contacts</a></li> 13 <li><a href="#">About us</a></li> 14 <li><a href="#">Testimonials</a></li> 15 </ul> 16 </nav> 17 </header><!-- /header -->
在文本后面加入:
1 <script type="text/javascript"> 2 var navigation = $('#nav-main').okayNav(); 3 </script>
然后保存就可以运行了