-1

Can I change css property when browser zoom is change without js, how to solve this overlapping while zooming

enter image description here

svarog
  • 9,477
  • 4
  • 61
  • 77
  • Please post an example or demonstration on a site like jsFiddle instead of a low-resolution screenshot. – Dai Feb 07 '17 at 06:30
  • Is this for zooming in or out? Please post a fiddle as the link you have attached is of low quality. – Sahil Dhir Feb 07 '17 at 06:32
  • Possible duplicate of [Detect page zoom change with jQuery in Safari](http://stackoverflow.com/questions/6163174/detect-page-zoom-change-with-jquery-in-safari) – kawadhiya21 Feb 07 '17 at 06:39

1 Answers1

0

try this:

var zoom = document.documentElement.clientWidth / window.innerWidth;
$(window).resize(function() {
    var zoomNew = document.documentElement.clientWidth / window.innerWidth;
    if (zoom != zoomNew) {
        $("p").css("background-color", "yellow");
        zoom = zoomNew
    }
});
Em Bryo
  • 63
  • 1
  • 5