$(document).ready(function() { var canvas = $("#myCanvas").get(0); var context = canvas.getContext("2d"); function renderContent() { context.lineWidth = 3; context.fillStyle = "#0000FF"; context.strokeStyle = "#FF0000"; context.beginPath(); context.arc(55, 55, 50, 0, Math.PI * 2, false); context.closePath(); context.fill(); context.stroke(); } renderContent(); });
<canvas id="myCanvas" width="500" height="500"> <p>Canvas not supported.</p> </canvas>
body { background-color: #000; }