开发者

How to create multiple layer images using Raphael canvas library?

开发者 https://www.devze.com 2023-02-22 19:59 出处:网络
Does anyone know how to make mul开发者_JAVA技巧tiple drawing layers using Raphael? Here\'s an example that uses a plain canvas object:

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

精彩评论

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