blob: 01e85ce8ffe117b7c6495f389d2b1f14eacd87c6 [file] [log] [blame]
<style>
.green-background {
width: 400px;
height: 400px;
background: -webkit-canvas(large-canvas) no-repeat 50% 50%;
}
</style>
<body>
<div class="green-background"></div>
<script>
var ctx = document.getCSSCanvasContext('2d', 'large-canvas', 400, 400);
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 400, 400);
</script>
</body>