Let´s start with some basic shapes! First, we will try the create the RSS symbol. Something like this:
Steps:
- Create folder and all the files:
$ mkdir canvas-rss-symbol
$ cd canvas-rss-symbol
$ touch index.html index.js style.css
$ code .
- Add
index.html
starter code:
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Canvas RSS symbol</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<canvas id="canvas" width="300" height="300"></canvas>
<!-- add js file in the end when the DOM is already loaded -->
<script src="index.js"></script>
</body>
</html>
- Play with the gathered knowledge on how to create: rectangles, triangles, lines, arcs and curves.
Happy coding! ❤️