blob: 6b128acf5188d2fe51ab3f4e6cf23866f1fb7a07 [file] [log] [blame]
<!DOCTYPE html>
<html>
<style>
html, body { margin: 0; padding: 0; }
</style>
<body>
<canvas id ="canvas" width="400" height="400" style="position:relative;"></canvas>
<script>
var canvas = document.getElementById('canvas');
var context = canvas.getContext("2d");
context.lineWidth = 20;
context.setLineDash([10, 30]);
context.lineDashOffset = 4;
context.beginPath();
context.moveTo(0, 100);
context.lineTo(400, 100);
context.stroke();
</script>
</body>
</html>