Determine visibility / real z-index of html elements
问题 Is it possible to determine if an html element is visible to the user? Example A page has an input field with a datepicker. If the user clicks on the input field, another div appears which allows the user to select the desired date. As long the datepicker is visible it hides elements which are behind it. I need a way to tell if an element is hidden or not. First Approach One way would be to check and compare the z-index values. But if they are note explicitly set, they are always auto .