我已經看到了相同的行爲,但只有8.4.1不與8.4。這似乎也是您的網站上的情況。 8.4.1設備需要雙擊,8.4只需要一個水龍頭。這是我構建的最小測試用例:
<html>
<head>
<title>Minimal testcase iOS 8.4.1 hover double tap problem</title>
<style>
body { font-size: 2em; } /* Only needed for a readable font-size */
a { display: block; font-decoration: none;}
a:hover { font-decoration: underline; }
</style>
</head>
<body>
<a href="http://www.apple.com/" >Click me</a>
</body>
</html>
我們通過使'a:hover'有條件解決了這個問題。您可以使用媒體查詢(但如果您想要定位iPad則很難),或者使用一些JavaScript添加可用於選擇CSS的類。例如:
if (!("ontouchstart" in document.documentElement)) {
document.documentElement.className += " no-touch";
}
有:
.iamanobnoxiousiphonedevice *:hover{
text-decoration: inherit !important;
}
來解決這方面的一個更簡單的方法是移除「顯示:塊」,但我不知道這是一個選擇。
非常感謝。我想我會把所有懸停的東西扔出去。至少在蘋果得到這個修復之前。 – Scheintod