For my mobile project, I am working on creating a window blind effect menu. The process is quite simple:
- Clicking on the menu icon moves the bar to the top while the menu drops down
- Upon selecting an item, the menu smoothly "rolls" up in a window blind style, revealing the content in a similar manner
Here are the sections of CSS that I believe may be causing the issue:
#menu_wrapper ul {
display: none;
top: 100px;
right: 0;
bottom: auto;
left: auto;
position: absolute;
height: auto;
width: 100vw;
margin: 0;
padding: 1em;
color: #f5f5f5;
font-size: 2.5rem;
background-color: rgba(0, 0, 0, 0.8); }
#menu_wrapper ul a {
color: #f5f5f5; }
#menu_wrapper ul a:hover {
color: #00a8b0;
text-decoration: none; }
#menu_wrapper address {
margin-top: 1.5rem;
font-size: 1.5rem; }
#menu_wrapper .item-content {
display: none;
top: 50%;
right: 0;
bottom: auto;
left: auto;
position: absolute;
height: auto;
width: 100vw;
margin: 0;
padding: 1em;
z-index: 3; }
The challenge I am facing is that the "item-content" remains within the parent "menu_wrapper". This could be due to the absolute positioning of "menu_wrapper," but I am struggling to resolve these specific cases. It may also involve my jQuery code, though I am uncertain (any suggestions are appreciated)!
Here is a link to a jsFiddle for you to examine: http://jsfiddle.net/smpte11/5s6qxntt/
Thank you.
EDIT: I want to clarify the effect I aim to achieve. Upon clicking the menu, it drops down, and when closed, it rises until it disappears in a window blind manner. Additionally, clicking on a menu item causes the menu to roll up and disappear (similar to closing it), with the content appearing below. Naturally, the same effect occurs when navigating back to the previous level.