Grid drawn using a element looking stretched

后端 未结 2 2000
忘了有多久
忘了有多久 2020-12-30 04:02

I\'m trying to draw a grid on a element with the ultimate goal of making a Go board.

For some reason the grid is looking stretched, with

2条回答
  •  渐次进展
    2020-12-30 04:28

    Please try it outside jsfiddle, maybe jsfiddle is applying some linear transformation.

    Also please make sure that you add 0.5 everywhere to both x and y coordinates. Alternatively, you can apply translate(0.5, 0.5) to shift all coordinates by half a pixel.

提交回复
热议问题