【发布时间】:2014-10-27 18:42:29
【问题描述】:
http://jsfiddle.net/28z7mb9r/2/
var canvas = document.getElementsByTagName('canvas')[0];
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(0, 0);
ctx.strokeStyle = "rgb(0, 0, 255);";
ctx.lineTo(100, 100);
ctx.stroke();
在 Chrome 中,小提琴显示为适当的蓝色。在 Firefox 中,它是黑色的。
【问题讨论】:
标签: javascript html google-chrome firefox canvas