0
캔버스 높이와 screen.availHeight가 다른 값을보고했습니다. 이 내 코드입니다 :canvas.height vs screen.availHeight 다른 값을 표시합니다.
canvas.height = document.height || document.body.clientHeight;
canvas.width = document.width || document.body.clientWidth;
내가 확인 :
alert("canvas.width = " + canvas.width +
"/n canvas.height = " + canvas.height +
"/n screen.availHeight = " + screen.availHeight);
내가 얻을 :
canvas.width = 1904 which seems correct;
canvas.height = 191 which is way out of order;
screen.availHeight = 1040 which seems correct.
내가 뭔가를 놓치거나 뭔가 잘못이 있습니까? 여기
을 사용할 수 있습니다! 추가 한 후 canvas.height = document.height가 올바른 창 높이를보고합니다. – Pagemaker