最新回答 / 半缺
现在可以了,原来要这样写<canvas id="five" width="450px" height="450px"></canvas>宽和高要写在标签里面而不是样式
2017-08-30
chess.onclick = function (event) {var x = event.offsetX; var y = event.offsetY; var xb = (x-15)%30; var yb = (y-15)%30;if (xb>11&&xb<19||yb>11&&yb<19) {return;}var i = Math.floor(x/30); var j = Math.floor(y/30); if(chessBoard[i][j] == 0){ paintPieces(i,j,each);chessBoard[i][j] = each;each*=-1;}};
最新回答 / 笨笨狼
没看出来哪里打错了?我也遇到同样问题。TypeError: context.createRadiaGradient is not a function. (In 'context.createRadiaGradient(200,200,50,200,200,20)', 'context.createRadiaGradient' is undefined)
2017-08-09
canvas{
display: block;
margin: 50px auto;
box-shadow: -20px -20px 20px #EFEFEF,5px 5px 5px #B9B9B9;
}
display: block;
margin: 50px auto;
box-shadow: -20px -20px 20px #EFEFEF,5px 5px 5px #B9B9B9;
}
2017-07-15