U
U
Umid2017-05-05 12:43:05
JavaScript
Umid, 2017-05-05 12:43:05

Why is the height too high?

Good afternoon.
The problem is here .
For some reason there is a vertical scroll bar.
Removed Padding and Margin from body and canvas.

21 строка в файле main.js		canvas.width = 10000;
22 строка в файле main.js		canvas.height = 10000;

27 строка в файле main.js	width = canvas.width = document.documentElement.clientWidth,
28 строка в файле main.js    height = canvas.height = document.documentElement.clientHeight;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2017-05-05
@DarCKoder

Because the canvas is inline by default, make it blocky - everything will pass

M
MaximMRX, 2017-05-05
@GM_pAnda

This is normal :) Add to body

body, canvas {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question