Skip to content

Instantly share code, notes, and snippets.

@sandrabosk
Created April 27, 2020 13:03
Show Gist options
  • Save sandrabosk/38fe443a43083761779a28c332b31163 to your computer and use it in GitHub Desktop.
Save sandrabosk/38fe443a43083761779a28c332b31163 to your computer and use it in GitHub Desktop.

Check for understanding - images and text

  1. Setup:
  • Create following folder/file structure:
.
├── index.html
└── js
    └── index.js
  • Add the HTML starter code with the canvas tag (width=300, heigth=300)
  1. Create image element and add any image you want to its source. Make image appear on the canvas.
  2. Create button Move image, and add on click handler to move image in any direction you want when clicked on the button.
  3. Add some text to the canvas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment