切换不工作为调整大小 [英] toggle not working for resize

查看:128
本文介绍了切换不工作为调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调整浏览器的大小时,首页个人资料等的导航应该消失,并会弹出菜单。点击它关闭菜单将与下面的导航,但封闭菜单的背景高度明显,而不是像它是。后切换后菜单后面的内容和悬停不工作



我的html如下

 < nav class =nav 
< input type =checkboxid =toggle/>
< label for =toggleclass =toggledata-open =MENUdata-close =关闭菜单onclick>< / label&
< ul class =menu>
< li>< a href =#>首页< / 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>

...我已经解决了我自己...感谢所有回复

code

/ code>会解决你的问题。


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

解决方案

Replacing all .ul in your CSS with ul will solve your problem.

这篇关于切换不工作为调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆