This commit is contained in:
Karan 2021-11-25 20:10:50 +05:30 committed by GitHub
parent 40ff39d689
commit fe9b3afcb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,27 +0,0 @@
<!doctype html>
<html>
<head>
<title>Canvas HTML5</title>
<style>
#canvas {
border: 1px solid black;
}
</style>
</head>
<body>
<canvas id="canvas" width="640" height="640">Not Supported</canvas>
<script>
const canvas = document.querySelector('#canvas');
const ctx = canvas.getContext('2d');
ctx.fillStyle = "red";
ctx.fillRect(100, 100, 500, 300); //filled shape
ctx.strokeRect(90, 90, 520, 320); // outline
ctx.clearRect(150, 150, 400, 200); //transparent
</script>
</body>
</html>