How to judge if a html component is visible on screen