Horje
js get vh value Code Example
js get vh value
function vh(v) {
  var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
  return (v * h) / 100;
}

function vw(v) {
  var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
  return (v * w) / 100;
}

function vmin(v) {
  return Math.min(vh(v), vw(v));
}

function vmax(v) {
  return Math.max(vh(v), vw(v));
}
console.info(vh(20), Math.max(document.documentElement.clientHeight, window.innerHeight || 0));
console.info(vw(30), Math.max(document.documentElement.clientWidth, window.innerWidth || 0));
console.info(vmin(20));
console.info(vmax(20));




Javascript

Related
get url parameter in react js Code Example get url parameter in react js Code Example
jquery find highest value in array Code Example jquery find highest value in array Code Example
how to check if a user is logged in javascript Code Example how to check if a user is logged in javascript Code Example
sum elements in list with same name js Code Example sum elements in list with same name js Code Example
video conferencing app with html and js Code Example video conferencing app with html and js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7