我想在iPad上隐藏一个基于项目触摸的元素。下面的链接显示-https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html,Safari支持ontouchstart启动属性,但它不起作用。在这种情况下我们该怎么做?我不能使用任何JavaScript。我只需要在html中实现它。
我的代码:
<div class="myclass" id="overlay" ontouchstart="hideElement()" onclick="hideElement()" onmousedown="hideElement()"></div>
发布于 2015-11-18 22:07:15
不能直接在html元素上添加ontouchstart。因为只有Apple扩展支持。您可以看到here
支持级别
Apple扩展。
你可以使用Jquery或不同的Apple扩展来实现。你可以在这里找到更多关于苹果扩展的详细信息:https://developer.apple.com/app-extensions/
https://stackoverflow.com/questions/33779013
复制相似问题