画布html5中的链接按钮 [英] link button in canvas html5

查看:89
本文介绍了画布html5中的链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
i have question 
Whether there is in canvas html5 image I would then link
thanks

推荐答案

您需要捕获整个画布的鼠标单击,按下或按下事件.使用clientX和clientY值确定光标是否在图像内,以查看是否应重定向到新页面.
You need to capture mouse click, down or up events for the whole canvas. Use the clientX and clientY values to determine if the cursor is inside your image to see if you should redirect to a new page.


这篇关于画布html5中的链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆