Is it possible to create html links out of text that is rendered in a canvas element?
相关问题
- React Native Inline style for multiple Text in sin
- Set BaseUrl of an existing Pdf Document
- Does using percentages instead of pixels change an
- Method for drawing circles in a pyramid pattern
- Using relative links in Blogger
相关文章
- HTML5 control
- How to get rid of border around and image used as
- Removing the href attribute
- canvas.toDataURL() not working properly [duplicate
- How to create a hyperlink to a different Excel she
- How to destroy / reload the canvas in html 5?
- Some Android devices extremely slow when rendering
- HTML5 Canvas: How to border a fillRect?
This example shows how you can add multiple links to your HTML canvas:
I personally like the idea of using links on top of the canvas and here is a full page sized canvas example. You could use this example for many things, and not just the canvas, so why not get comfortable with it. `
There is no easy way. You will have to draw the link text onto the canvas and then check for mouseclicks. Here is a demo html page:
I think another easy idea is to put a div at the position where you want the link to appear on the canvas and put your link at the div. All you will have to do is to position and style the div correctly.
There is nothing built in to do it, but you can emulate the function of links if you wanted to. You can remember where the text is, color it differently, give it a different cursor when the user mouses-over that area, and redirect the user to another page when he or she clicks on it.