我怎样才能知道哪个“按钮”?移动版 Safari 中是否被窃听?
我有一个 html“按钮”,实际上就是这样:
<div onClick="window.location.href=somePage.htm">
<img src="img.png"/>
</div>
在桌面 Safari 中工作正常。它在移动 Safari 中工作...但是,当我在移动 Safari 中点击“按钮”时,我没有看到灰色的小轮廓框准确指示我正在点击的内容。 如何才能显示这个灰色的小轮廓框? 我发现移动版 Safari 的此功能非常有用,我想为用户提供它。
干杯!
I have an html "button" which is really just this:
<div onClick="window.location.href=somePage.htm">
<img src="img.png"/>
</div>
Works fine in desktop Safari. And it works in mobile Safari... however when I tap the "button" in mobile safari I don't see the little gray outline box indicating exactly what I'm tapping. How can I get this little gray outline box to show up? I find this feature of mobile Safari to be very useful and I'd like to provide it for the user.
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为移动 Safari 仅将此应用于可点击元素。查看此文档。我建议您只需使用
元素来实现此目的:
这应该与您的
完全一样,只是带有一点样式。
I think that mobile Safari applies this to clickable elements only. Have a look at this documentation. I would suggest that you simply use a
<a>
-element for this purpose:This should work exactly like your
<div>
with a little styling.您应该使用链接。
You should use a link.