简体   繁体   English

iOS上的双击菜单

[英]Double tap menu on iOS

I created a web in wordpress with "Moco WP" template. 我使用“ Moco WP”模板在wordpress中创建了一个网站。 It works ok on Windows and Android devices, but when I try to see it on iOS (iPhone) I have to click menu twice to make it work. 它可以在Windows和Android设备上正常运行,但是当我尝试在iOS(iPhone)上看到它时,我必须单击两次菜单才能使其正常运行。 This issue happens with Chrome and Safari. Chrome和Safari会发生此问题。 I upload a picture of the problem for you. 我为您上传了问题的图片。 Thanks! 谢谢! Example

in /moco-wp/css/style.css remove this part /moco-wp/css/style.css删除此部分

header nav li a:hover:after {
  width: 100%;
}

you can move that to a media query to target only devices that can hover 您可以将其移至媒体查询,以仅定位可以悬停的设备

@media (any-hover: hover) {
  header nav li a:hover:after {
    width: 100%;
  }
}

if you want the same functionality, you can attach to the touchstart event of the links and apply a class as soon as you touch down on them 如果您想要相同的功能,则可以附加到链接的touchstart事件,并在触摸它们时立即应用一个类

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

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