How to make canvas be transparent and let it can transparent above to the other "html element"

Hi,everyone,I have some problem when I put a canvas on other html element and want canvas be transparent.
Unfortunately,I try all I know methods but do not work.

for example,canvas on ‘video tag’,but the canvas get black.

the method I have try:

  1. In CCDirector.js, setGLDefaultValues function, change the opengl default values “cc.renderContext.clearColor(0.0, 0.0, 0.0, 0.0);”,do not work.
  2. In CCDirector.js ,mainLoop function, delete or comment the code “this.drawScene();” this action for me means disable draw and clear. I observed the canvas always black.

I think that problem is about WebGL and I googling,but don’t find the solution.

thank you.

Hi, there

Have you tried to set the css style of your canvas element with: opacity: 0;
Whatever you do with cocos2d engine, you can not make the canvas itself transparent.

Huabin