javascript replace all pixel values with vw code example
Example: javascript convert px to vw
//1px = 100vw / viewport's width (in px)
function convertPXToVW(px) {
return px * (100 / document.documentElement.clientWidth);
}
//1px = 100vw / viewport's width (in px)
function convertPXToVW(px) {
return px * (100 / document.documentElement.clientWidth);
}