如果我想到或找到了解決此問題的解決方案,則會耗盡Iv。我正在修復頁面的頂部。左側有一個可將您帶到頁面頂部的錨點,如果在其上方懸停,則會顯示其他外部鏈接。右側是帶錨的頁面部分的列表,可供您瀏覽。iOS點擊激活下拉菜單的父錨點
這一切都適用於桌面作爲懸停和點擊是單獨的事件,但在iPad上它們是相同的。在iPad上,您應該可以觸摸「產品列表」列表項並顯示下拉菜單。如果再次觸摸,它會將您帶回頂部。現在,當您觸摸它時,會將您帶回頂部並顯示懸停。
這是一個jsfiddle,重新創建代碼和問題。 http://jsfiddle.net/hyaTV/5/
HTML
<ul class="one">
<li><a class="intrapage" href="#stage">Product Title</a>
<ul>
<li><a href="other product">other product</a></li> <!-- link that goes to different page -->
<li><a href="other product">other product</a></li> <!-- link that goes to different page -->
</ul>
</li>
</ul>
<ul class="two">
<li><a class="intrapage" href="#section_one">birds</a></li> <!-- goes to Birds section -->
<li><a class="intrapage" href="#section_two">bees</a></li> <!-- goes to bees section -->
</ul>
CSS
ul.one{float:left;list-style:none;}
ul.one ul{display:none;}
ul.one > li:hover ul{display:block;}
/* styling for right side nav */
ul.two{float:right;list-style:none;}
ul.two li{display:inline-block;}
JS
// scrolls window to element id with easing
$(".intrapage").click(function(event) {
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 850);
return false;
});
http://www.theverge.com似乎已經解決了這個問題,但我不喜歡他們的代碼是多麼複雜的導航,只是似乎並不像一個很優雅的方案。 – user1678025 2013-04-25 18:48:22