问题
when i resize the browser the nav having home profile etc should disappear and MENU would pop up. on clicking it CLOSE MENU would come with the nav below but the background of close menu expanda height wise instead of being as it is..also after the toggle the menu goes behind the content and hover doesnt work
my html is as follows
<nav class="nav">
<input type="checkbox" id="toggle" />
<label for="toggle" class="toggle" data-open="MENU" data-close="Close Menu" onclick></label>
<ul class="menu">
<li><a href="#">HOME</a></li>
<li class="parent"><a href="#">PROFILE</a>
<ul class="children submenu0">
<li><a href="#">SIZE</a>
</li>
<li class="parent"><a href="#">NATURE</a>
<ul class="children submenu1">
<li><a href="#">SMALL</a></li>
<li><a href="#">MEDIUM</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
...i have solved on my own ...thank to all who responded
回答1:
Replacing all .ul
in your CSS with ul
will solve your problem.
来源:https://stackoverflow.com/questions/22575480/toggle-not-working-for-resize