Skip to content

Instantly share code, notes, and snippets.

@ggendre
Created December 14, 2011 10:19
Show Gist options
  • Save ggendre/1476017 to your computer and use it in GitHub Desktop.
Save ggendre/1476017 to your computer and use it in GitHub Desktop.
CSS & Canvas, how to share the same coords context
<style type="text/css">
#dessin{ width: 960px; height:785px; position:relative; }
#dessin #canvasContainer{ width: 100%; height:100%; position:absolute; z-index:2; }
#dessin #htmlDrawContainer{ width: 100%; height:100%; position:absolute; z-index:2; }
#dessin #htmlDrawContainer a{ position:absolute; display:block; }
</style>
<div id="dessin">
<div id="canvasContainer"><!--canvas will be here--></div>
<div id="htmlDrawContainer"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment