Answers for "css vw not working on mobile"

0

css vw not working on mobile

//In your js file:
window.addEventListener('resize', () => { 
  document.querySelector(':root').style
    .setProperty('--vw', window.innerWidth/100 + 'px');
})

//Css
width: calc(100 * var(--vw));
Posted by: Guest on November-01-2020

Code answers related to "css vw not working on mobile"

Code answers related to "Javascript"

Browse Popular Code Answers by Language