答案 0 :(得分:0)
试试这个:
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
}
});