LoginSignup
1
0

More than 5 years have passed since last update.

What return height size by IE, backCompat IE?

Posted at
var body = document.body,
    html = document.documentElement;


//document.compatMode === backCompat
body.clientHeight //=> viewport size.
body.scrollHeight //=> contents size.
body.offsetHeight //=> viewport size.

html.clientHeight //=> 0;
html.scrollHeight //=> viewport size.
html.offsetHeight //=> viewport size.

//document.compatMode === CSS1compat
body.clientHeight //=> contents size.
body.scrollHeight //=> contents size.
body.offsetHeight //=> contents size.

html.clientHeight //=> viewport size.
html.scrollHeight //=> contents size.(larger)
html.offsetHeight //=> viewport size.
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0