s18.me ios.html,Are Touch Events in HTML Image Maps Supported in iOS/Mobile Safari

本文探讨了HTML Image Maps在Mobile Safari中对于触摸事件的支持情况。作者通过实验发现,尽管鼠标事件可以被触发,但触摸事件却未能响应,尤其是在不规则形状的可点击区域。这一现象在iPad上表现得尤为明显。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Can anyone tell me, definitively, if html image maps support touch events in Mobile Safari? I need to use image maps because I have clickable areas that are irregularly shaped. My testing shows that mouse events are supported (but in a limited way) and that touch events don't seem to fire at all.

I did this simplest test:

Polygons

The blue polygon is rigged for mouse events.

The red polygon is rigged for touch events.

When I view this page in regular Safari, clicking or hovering over the blue polygon fires off events as I would expect. And, of course, the red polygon does nothing (since touch events are not supported on the desktop)

However, when I view this page on my iPad, The blue polygon fires a triplet of mousemove, mousedown, mouseup on single tap and nothing else. Worse yet, touching the red polygon does nothing!

I'm totally hoping that I just missed something simple but if not, I'd really like to know for sure what's going on.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值