开发者

How to create multiple layer images using Raphael canvas library?

Does anyone know how to make mul开发者_JAVA技巧tiple drawing layers using Raphael? Here's an example that uses a plain canvas object:

http://html5.litten.com/using-multiple-html5-canvases-as-layers/


You can use the same method as they used with canvas.

Create div elements in the html code, give each a distinct id. You can initialize Raphael on an existing element by using paper=new Raphael('elementId',width,height).

This makes is possible to apply css rules to the elements. Set the css just like in the article:

Apply position: absolute; to all elements and use z-index to stack the elements in the order you want.

CSS positioning

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜