Responsive Canvas

How do I make createCanvas() become responsive and scale to it's parent container div? In other words, how do I make it behave like a background image with this css? -webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain; background-position:center; background-repeat: no-repeat; background-position:center center;

I also want it to be centered within the parent.

Tagged:
Sign In or Register to comment.