javascript - How to create a vertical off-canvas drop down menu in Foundation? -


currently foundation allows create off-canvas menus slide in horizontally left or right. i'd love know how create 1 slide vertically top bottom: moving wrapped content downwards.

i understand there independent javascript/ajax solutions this. answer i'm looking adhere existing foundation code as possible; using relevant right/left menu code template.

thanks in advance :).

i realise old question , i'm unsure if you're still hung-up on sake of future reference here simple css solution.

following offcanvas example on foundation website can replace class 'position-left' 'position-top' , add 'data-position="top"' below.

<div class="off-canvas position-top" id="offcanvas" data-off-canvas data-position="top"> 

in css add class 'is-open-top' open menu vertically.

.is-open-top {     -webkit-transform: translatey(250px);     -ms-transform: translatey(250px);     transform: translatey(250px); } 

then need re-position menu items following class

.off-canvas.position-top {     left: 0px;     top: -250px;     width: 100%; } 

and remove scroll bar

.off-canvas-wrapper  {   overflow: hidden; } 

working example http://codepen.io/rawiki/pen/ezamzl

as menu opens push body content downwards. note not automatically resize add menu items need increase or decrease 'translatey' distance setting 'top' negative of same value.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -