Skip to content

Instantly share code, notes, and snippets.

@plencovich
Created March 17, 2023 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plencovich/cd350682c6085decf507a6afabc3b488 to your computer and use it in GitHub Desktop.
Save plencovich/cd350682c6085decf507a6afabc3b488 to your computer and use it in GitHub Desktop.
Conocer que elemento genera scroll horizontal en una web
document
.querySelectorAll("*")
.forEach(el => {
const { offsetWidth } = document.documentElement
if (el.offsetWidth > offsetWidth) {
console.log(el);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment