一切都说“等宽线没有这个问题”,但它们确实
是我的代码:
var c = document.getElementById("clamvas");
var ctx = c.getContext("2d");
ctx.lineWidth = 2;
ctx.moveTo(0, 0);
ctx.lineTo(1728, 877);
ctx.stroke();
canvas
{
width:90%;
height:90%;
padding: 0;
margin: auto;
display: block;
border:5px solid #000000;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
<canvas id="clamvas"></canvas>