Determine visibility / real z-index of html elements

前端 未结 3 1826
孤独总比滥情好
孤独总比滥情好 2020-12-21 03:21

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

3条回答
  •  盖世英雄少女心
    2020-12-21 03:48

    the only way I can think of is by getting the offset of each item and checking that onclick of something that the offset of the new item isn't within the offset of anything previous. Obviously that just the theory behind it making something that does that will take a long time. Good luck :)

提交回复
热议问题