Skip to content

Instantly share code, notes, and snippets.

@webdesignberlin
Created August 16, 2018 07:36
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 webdesignberlin/5749cf12a321d44dca48807767047925 to your computer and use it in GitHub Desktop.
Save webdesignberlin/5749cf12a321d44dca48807767047925 to your computer and use it in GitHub Desktop.
Find z-index
// Find max used z-index
[...document.querySelectorAll('*')].map(e => ~~getComputedStyle(e,null).getPropertyValue('z-index'))
// Find elements with z-index
[...document.querySelectorAll('*')].filter(e => getComputedStyle(e,null).getPropertyValue('z-index') > 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment