简体   繁体   English

CSS3下拉菜单链接在iOS中不起作用

[英]CSS3 Dropdown Menu Links not working in iOS

I have an issue with iOS not loading the dropdown menu links, it works fine in others, only iOS. 我在iOS上未加载下拉菜单链接时遇到问题,在其他情况下(仅在iOS上)正常运行。

Live Site: http://sandbox.myramani.com/espace/ 实时网站: http//sandbox.myramani.com/espace/

Basically when you view it via any iOS browser, the navigation dropdown links do not link to the interior pages, instead it just refreshes the homepage. 基本上,当您通过任何iOS浏览器查看它时,导航下拉链接并不链接到内部页面,而是仅刷新主页。 Can anyone help me figure out why this is occurring? 谁能帮我弄清楚为什么会这样吗?

CSS: CSS:

#nav ul li ul.dd {
box-sizing:border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
position:absolute;
z-index:99;
top:60px;
left:0px;
margin-left:0px;
width:220px;
background:#fff;
display:none;
box-shadow: 0px 0px 10px rgba(0,0,0,.4);
padding-bottom:10px;}

#nav ul li:hover ul.dd, #nav ul li:focus ul.dd {
display: block;
}

What is the reason for: 原因是:

onclick="return true" 

on the ? 在? Could be the issue. 可能是问题。 I don't see the need for an JS on those. 我认为这些都不需要JS。

IOS ignores any links that have display:none OR visibility:hidden -- even if the :hover shows it. IOS会忽略具有display:none或visible:hidden的任何链接-即使:hover显示它。 I can't remember the specifics. 我不记得具体情况。

Now I have the quote from Apple: 现在,我得到了苹果的报价:

"if the contents of the page changes on the mousemove event, no subsequent events in the sequence are sent." “如果页面的内容在mousemove事件上发生更改,则不会发送序列中的后续事件。”

Replace with the following: 替换为以下内容:

       #nav ul li ul.dd {
          box-sizing:border-box;
          -webkit-box-sizing:border-box;
          -moz-box-sizing:border-box;
          position:absolute;
          z-index:99;
          top:60px;
          left:0px;
          margin-left:0px;
          background:#fff;
          opacity:0; /* added */
          width:0px;/* added */
          height:0px;/* added */
          overflow:hidden;/* added */
          box-shadow: 0px 0px 10px rgba(0,0,0,.4);
          padding-bottom:10px;
      }

        #nav ul li:hover ul.dd, #nav ul li:focus ul.dd {
           opacity:1;
           width:220px;
           height:auto;
           overflow:visible;
        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM