A
A
All10002021-11-29 16:46:26
JavaScript
All1000, 2021-11-29 16:46:26

How does screen size work?

I don't understand what I'm confused about.

On the page, you need to display blocks, each of which is 20 pixels. They need to take up the full width of the screen.

Let's say the screen width is 1000 pixels (window.innerWidth). I thought I could calculate how many blocks to fill in width like this: 1000 / 20, but it turns out that 50 blocks are needed, although if you look at it visually, you need much less. What is my confusion?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question