preventing magnifier to appear

隐身守侯 提交于 2019-12-25 03:55:30

问题


I want to show my own popup when a text is selected and mouse is clicked for 1-2 seconds. I can get it working in FF/Chrome but in iphone/ipad's safari when I tap a text for sometime a magnifier appears, how to prevent that magnifier and show my own popup?


回答1:


I don't have all the answers for showing your own popup (that'll require some JS hacking), but to get rid of that magnifying glass, just add this to your CSS:

body {
  -webkit-touch-callout: none;
}

...Or just add to the element you want to disable the magnifier on.



来源:https://stackoverflow.com/questions/6332750/preventing-magnifier-to-appear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!