Adding CSS3 transitions to WordPress drop-down menu based on Foundation

If you want to add CSS3 transitions to a WordPress drop-down menu on a website based on Foundation framework, you only need to add some CSS classes and some CSS code, without any requirement for jQuery or some other JS library.

The first thing is to add either class or ID (your choice) to the first container above the first level <ul> element. Let me show you an example on a FoundationPress theme, a starter-theme for WordPress built with Foundation, built by Ole Fredrik Lie. Needless to say, I highly recommend this theme for any WordPress project based on foundation (it has custom walker class implemented – do I need to say more? 🙂 ). So this is the code:

And this is where you would add CSS class or ID. Let’s use .fd-animate class for now:

And now all that we need is CSS (this theme is using Sass, but I will show “pure” CSS  for those who don’t use the Sass approach):

For positioning purposes, you may want to overwrite default foundation CSS:

This may be a bit rough code which you can modify for your purposes, but the main point is that it covers the idea of adding transitions to WordPress drop-down menu based on foundation framework.