fly icon indicating copy to clipboard operation
fly copied to clipboard

在手机web页面中:top值问题

Open annylsj opened this issue 8 years ago • 3 comments

如果商品很多,页面可以滚动,当商品开始时的top值高度大于屏幕的高度,加入购物车时,top值会比商品在屏幕中显示的位置低,请问如何解决?谢谢

annylsj avatar Jul 06 '16 06:07 annylsj

我也有这个问题,好像是fixed的过,浏览器滚动条滚动后,高度位置就不对了

djfly avatar Sep 05 '16 09:09 djfly

改成absolute $element.css({marginTop: '0px', marginLeft: '0px', position: 'absolute'}).appendTo('body'); 暂时可以用,不知道会不会有什么问题

djfly avatar Sep 05 '16 10:09 djfly

起点的top值写鼠标距离浏览器的距离就可以了clientY start: { left: event.pageX, top: event.clientY },

EchoWht avatar Oct 09 '16 13:10 EchoWht