HTML Canvas
HTML Canvas
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>Canvas</p>
<canvas id="myCanvas" height=300 width=500 style="border:2px solid;">
</canvas>
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.moveTo(0,100);1`
ctx.lineTo(500,100);
ctx.moveTo(0,200);
ctx.lineTo(500,200);
ctx.stroke();
</script>
</body>
</html>
Click here for download .html text file
<html>
<head>
</head>
<body>
<p>Canvas</p>
<canvas id="myCanvas" height=300 width=500 style="border:2px solid;">
</canvas>
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.moveTo(0,100);1`
ctx.lineTo(500,100);
ctx.moveTo(0,200);
ctx.lineTo(500,200);
ctx.stroke();
</script>
</body>
</html>
Awsome bro i like it very much
ReplyDeleteThank you brother
Delete