如何在HTML 5 Canvas中实现工具提示

时间:2011-11-01 10:14:53

标签: html5 html5-canvas tooltip

enter image description here

我使用HTML 5画布绘制了这个。当我点击用户图片时,我需要显示工具提示。

    var kin = new Kinetic("myCanvas");

    kin.setStage(function(){
       var context = kin.getContext();
       kin.beginRegion();

       // draw rectangular region  including photo
       context.beginPath();
       context.rect(X + 50, Y + 50, 62, 72);
       context.closePath();


        kin.addRegionEventListener("mouseover", function(){
        document.body.style.cursor = "pointer";



        });
     }

请帮忙。

0 个答案:

没有答案