Marking points on an image
How can i mark points on an image on my html page after user clicks the image.I want to display some points on an im开发者_StackOverflow中文版age displayed on the page as soon as user clicks the desired thing.
Place these 'points' as img
elements, positioned absolutely, over the original image. You can specify their X, Y coordinates by using the 'left' and 'top' css properties.
If the original img
element has relative positioning, you can state the coordinates in relation to the image you are putting the markers on to.
If you don't need to support old browsers, have a look at the HTML5 canvas element.
- https://developer.mozilla.org/en/Canvas_tutorial/Using_images and
- https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes
might be useful in this case.
精彩评论