Get the offset of a hidden element

后端 未结 3 1758
迷失自我
迷失自我 2020-12-05 04:11

How can I get the coordinates of a hidden element? offset() doesn\'t support the use for hidden elements. Any hints?

3条回答
  •  眼角桃花
    2020-12-05 05:03

    You can get coordinates of visibility:hidden element but display:none element is excluded from rendering tree. So its position is undefined.

提交回复
热议问题