html - CSS drop down menu is not working on iOS devices -


why css dropdown menu work on android , pc browsers, not ios devices?

.mainheaderbtns ul li:hover > ul {     display:block; } 

as of tests, dropdown menus, make sure <a href="#"> element visible , clickable on page, have made simple demo , works fine.

.nav > li > ul {    display: none;  }  .nav > li:hover > ul {    display: block;  }
<ul class="nav">    <li>      <a href="#">menu item</a>      <ul>        <li>sub item</li>      </ul>    </li>  </ul>

for element, apple 1 recommends add onclick = "void(0)" found onclick="return false;"or onclick="" works.

div span {    display: none;  }  div:hover span {    display: inline;  }
<div onclick="void(0)">howdy <span>mates!</span></div>


1https://developer.apple.com/library/ios/documentation/appleapplications/reference/safariwebcontent/handlingevents/handlingevents.html


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo