Gets a CanvasRenderingContext which can be used as the CSS background of an element.
Gets a CanvasRenderingContext which can be used as the CSS background of an element.
CSS:
background: -webkit-canvas(backgroundCanvas)
Generate the canvas:
var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
100, 100);
context.fillStyle = 'red';
context.fillRect(0, 0, 100, 100);
See also: