1

What the device-width CSS3 property refers to? Is it screen.width or rather window.innerWidth?

Mulligun81
  • 119
  • 1
  • 13

2 Answers2

0
window.innerWidth 

exactly, which work only for device

lalala
  • 1,121
  • 1
  • 9
  • 9
0

According to MDN

Describes the width of the output device (meaning the entire screen or page, rather than just the rendering area, such as the document window).

And this question:

max-device-width is the width of the device's entire rendering area, i.e. the actual device screen

Therefore it's screen.width.

Community
  • 1
  • 1
Nhan
  • 3,595
  • 6
  • 30
  • 38