使用getboundingclientrect方法实现简洁的sticky组件的方法