📜  js如何将vh转换为像素 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:30.128000             🧑  作者: Mango

代码示例1
Not necessarily screen.height * 0.65, but viewport.height * 0.65. Even though a Windows 8 app will always have the same height, regardless of the snapped state, this is an important difference in browser-based applications.

In JavaScript:

document.documentElement.clientHeight * 0.65;