JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
CSS
div {
width:100px;
height:100px;
background:#ccc;
}
div:nth-child(2) {
margin-left:50px;
margin-top:50px;
}
div:nth-child(3) {
margin-left:100px;
margin-top:100px;
}
div:nth-child(4) {
margin-left:150px;
margin-top:150px;
}
div:nth-child(5) {
margin-left:200px;
margin-top:200px;
}
div:nth-child(6) {
margin-left:850px;
margin-top:250px;
}
.atencao {
background:red;
box-shadow:0 0 0 20px yellow, 0 0 0 5px white inset;
}
JavaScript
function escanearPagina(el) {
var i = [],
t, x, y, w, h,
ww = $(window).width(),
wh = $(window).height();
el.each(function () {
t = $(this);
x = t[0].offsetLeft;
y = t[0].offsetTop;
w = t.outerWidth();
h = t.outerHeight();
if (w > ww || +x + w > ww || h > wh || +y + h > wh) {
i.push(t[0]);
}
});
return i;
}
//roda a função
var resultado = escanearPagina($('body *'));
$(resultado).addClass('atencao');