Foundation CSS Dropdown Menu
Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices.
The Dropdown menu is used for displaying an expandable dropdown menu by using the Foundation CSS plugin.
Foundation CSS Dropdown Menu Class:
- dropdown: This class is used to change a basic menu into an expandable dropdown menu.
- menu: This class is used to create basic menu items. This class is used inside <ul> element.
<ul class="dropdown menu" data-dropdown-menu> <li><a href="#">....</a></li> .... </ul>
Example 1: Horizontal Dropdown Menu, the following code demonstrates a horizontal dropdown menu.
Example 2: For vertical Dropdown, just add vertical class to the dropdown menu and add vertical nested menu class in the submenu of the dropdown menu.