Skip to content

Instantly share code, notes, and snippets.

@ondrek
Last active January 3, 2016 05:59
Show Gist options
  • Save ondrek/8419662 to your computer and use it in GitHub Desktop.
Save ondrek/8419662 to your computer and use it in GitHub Desktop.
JSFiddle Gist
canvas { margin: 20px; }
<canvas width="500" height="400"></canvas>
var canvas = document.querySelector("canvas");
var ctx = canvas.getContext("2d");
ctx.strokeStyle = "#eee";
ctx.stroke();
ctx.font = "bold 15px sans-serif";
ctx.fillText("test", 0, 160);
name: CanvasText Demo
description: Demo how to works with Canvas and Text
authors:
- Samuel Ondrek
resources:
- /css/normalize.css
normalize_css: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment