我已经看到了相同的行为,但只有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