זיהוי אלו אלמנטים גורמים לגלילה אופקית
Tue May 18 2021 19:12:24 GMT+0000 (UTC)
Saved by
@Shesek
function (debug) {
var w = debug.documentElement.offsetWidth,
t = debug.createTreeWalker(debug.body, NodeFilter.SHOW_ELEMENT),
b;
while (t.nextNode()) {
b = t.currentNode.getBoundingClientRect();
if (b.right > w || b.left < 0) {
t.currentNode.style.setProperty('outline', '1px dotted red', 'important');
console.log(t.currentNode);
}
};
}(document));
content_copyCOPY
1. נכנסים לדף האתר לא דרך האלמנטור - ctrl+shift+j
2. דואגים להחליף ב - console למצב mobile
3. מכניסים את הקוד שלמעלה
לאחר מכן כל האובייקטים יהיו מסומנים בקווים אדומים לאורך ולרוחב ותוכל לראות איזה ווידג'ט גורם לגלילה אופקית😃
Comments