mic*_*lle 5 html css mobile ipad
I'm creating a site that will be viewed on the iPad and I'm trying to prevent the copy and paste bubble from appearing when the user touches and holds on an image because I'd like something to happen ontouchstart and ontouchend.
Here is my html
<img class="appImg" src="img/fundMobile.jpg" />
Run Code Online (Sandbox Code Playgroud)
Here is my css
.appImg{
-webkit-user-select: none;
}
Run Code Online (Sandbox Code Playgroud)
Once I press and hold on my iPad the bubble still appears. Any ideas on how to fix this?
您可以尝试e.preventDefault()在ontouchstart处理程序中包含:
yourElement.ontouchstart = function(e) {
e.preventDefault();
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6291 次 |
| 最近记录: |